Commit 9c8895be by sikang

nothing

parent 4357e5b3
...@@ -90,15 +90,15 @@ class DefaultHeaderAddInterceptor implements Interceptor { ...@@ -90,15 +90,15 @@ class DefaultHeaderAddInterceptor implements Interceptor {
return ROOT_STATUS; return ROOT_STATUS;
} }
public String getSimInfo() { // public String getSimInfo() {
if (TextUtils.isEmpty(SIM_INFO)) { // if (TextUtils.isEmpty(SIM_INFO)) {
String sim_info = AppInfoUtils.getSimSerialNumber(LibConfig.getContext()) + "," + AppInfoUtils.getPhoneNumber(LibConfig.getContext()); // String sim_info = AppInfoUtils.getSimSerialNumber(LibConfig.getContext()) + "," + AppInfoUtils.getPhoneNumber(LibConfig.getContext());
if (sim_info.length() > 1) { // if (sim_info.length() > 1) {
SIM_INFO = sim_info; // SIM_INFO = sim_info;
} // }
} // }
return SIM_INFO; // return SIM_INFO;
} // }
private String getGAId() { private String getGAId() {
if (!TextUtils.isEmpty(GA_ID)) { if (!TextUtils.isEmpty(GA_ID)) {
......
...@@ -72,47 +72,47 @@ public class AppInfoUtils { ...@@ -72,47 +72,47 @@ public class AppInfoUtils {
} }
@SuppressLint("MissingPermission") // @SuppressLint("MissingPermission")
public static String getPhoneNumber(Context context) { // public static String getPhoneNumber(Context context) {
try { // try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); // TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager != null && PermissionsHelper.isGranted(context, Manifest.permission.READ_PHONE_STATE)) { // if (telephonyManager != null && PermissionsHelper.isGranted(context, Manifest.permission.READ_PHONE_STATE)) {
return telephonyManager.getLine1Number(); // return telephonyManager.getLine1Number();
} // }
} catch (Exception e) { // } catch (Exception e) {
return ""; // return "";
} // }
return ""; // return "";
} // }
//
@SuppressLint("MissingPermission") // @SuppressLint("MissingPermission")
public static String getIMSI(Context context) { // public static String getIMSI(Context context) {
try { // try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); // TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager != null && PermissionsHelper.isGranted(context, Manifest.permission.READ_PHONE_STATE)) { // if (telephonyManager != null && PermissionsHelper.isGranted(context, Manifest.permission.READ_PHONE_STATE)) {
String imsi = telephonyManager.getSubscriberId(); // String imsi = telephonyManager.getSubscriberId();
LogUtils.d("IMSI_INFO",imsi); // LogUtils.d("IMSI_INFO",imsi);
return imsi; // return imsi;
} // }
} catch (Exception e) { // } catch (Exception e) {
return ""; // return "";
} // }
return ""; // return "";
} // }
//
//
@SuppressLint("MissingPermission") // @SuppressLint("MissingPermission")
public static String getSimSerialNumber(Context context) { // public static String getSimSerialNumber(Context context) {
try { // try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); // TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager != null && PermissionsHelper.isGranted(context, Manifest.permission.READ_PHONE_STATE)) { // if (telephonyManager != null && PermissionsHelper.isGranted(context, Manifest.permission.READ_PHONE_STATE)) {
return telephonyManager.getSimSerialNumber(); // return telephonyManager.getSimSerialNumber();
} // }
} catch (Exception e) { // } catch (Exception e) {
return ""; // return "";
} // }
return ""; // return "";
} // }
/** /**
* 判断是否已ROOT * 判断是否已ROOT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment