更新 DeviceInfoUtils.java

dev
wangsiyuan 2023-12-08 20:55:32 +08:00
parent 6ae23c1e2f
commit c0548705a2
1 changed files with 0 additions and 16 deletions

View File

@ -20,22 +20,6 @@ public class DeviceInfoUtils {
public static int getDeviceHeight(Context context) { public static int getDeviceHeight(Context context) {
return context.getResources().getDisplayMetrics().heightPixels; return context.getResources().getDisplayMetrics().heightPixels;
} }
/**
* android.permission.READ_Phone_STATE
* Android 10
*/
public static String getIMEI(Context context) {
TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
String deviceId = tm.getDeviceId();
if (deviceId == null) {
return "UnKnown";
} else {
return deviceId;
}
}
/** /**
* *
**/ **/