Loading services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java +11 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,17 @@ class EnterpriseSpecificIdCalculator { TelephonyManager telephonyService = context.getSystemService(TelephonyManager.class); Preconditions.checkState(telephonyService != null, "Unable to access telephony service"); mImei = telephonyService.getImei(0); mMeid = telephonyService.getMeid(0); String meid; try { meid = telephonyService.getMeid(0); } catch (UnsupportedOperationException doesNotSupportCdma) { // Instead of catching the exception, we could check for FEATURE_TELEPHONY_CDMA. // However that runs the risk of changing a device's existing ESID if on these devices // telephonyService.getMeid() actually returns non-null even when the device does not // declare FEATURE_TELEPHONY_CDMA. meid = null; } mMeid = meid; mSerialNumber = Build.getSerial(); WifiManager wifiManager = context.getSystemService(WifiManager.class); Preconditions.checkState(wifiManager != null, "Unable to access WiFi service"); Loading Loading
services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java +11 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,17 @@ class EnterpriseSpecificIdCalculator { TelephonyManager telephonyService = context.getSystemService(TelephonyManager.class); Preconditions.checkState(telephonyService != null, "Unable to access telephony service"); mImei = telephonyService.getImei(0); mMeid = telephonyService.getMeid(0); String meid; try { meid = telephonyService.getMeid(0); } catch (UnsupportedOperationException doesNotSupportCdma) { // Instead of catching the exception, we could check for FEATURE_TELEPHONY_CDMA. // However that runs the risk of changing a device's existing ESID if on these devices // telephonyService.getMeid() actually returns non-null even when the device does not // declare FEATURE_TELEPHONY_CDMA. meid = null; } mMeid = meid; mSerialNumber = Build.getSerial(); WifiManager wifiManager = context.getSystemService(WifiManager.class); Preconditions.checkState(wifiManager != null, "Unable to access WiFi service"); Loading