summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tomasz Wasilczyk <twasilczyk@google.com> 2025-02-04 13:41:40 -0800
committer Tomasz Wasilczyk <twasilczyk@google.com> 2025-02-04 14:14:33 -0800
commit5bb272a381b3568abebd4d59a7555d2f1e55d0a9 (patch)
tree44b23c327a3b0571613312686f13d5a26c759ac0
parent9a93e19522de4ffca4a7726ea985e03820218495 (diff)
There's no CDMA-only devices anymore
So there should be no need to check for GSM feature. Bug: 367363970 Test: TH Flag: EXEMPT should be a no-op Change-Id: I8eec048af39dd9b4bf4fc96609b732dec4ddc088
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java12
1 files changed, 1 insertions, 11 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java b/services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java
index 6e038f9b67a0..ba02122d1dc5 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java
@@ -54,17 +54,7 @@ class EnterpriseSpecificIdCalculator {
TelephonyManager telephonyService = context.getSystemService(TelephonyManager.class);
Preconditions.checkState(telephonyService != null, "Unable to access telephony service");
- String imei;
- try {
- imei = telephonyService.getImei(0);
- } catch (UnsupportedOperationException doesNotSupportGms) {
- // Instead of catching the exception, we could check for FEATURE_TELEPHONY_GSM.
- // However that runs the risk of changing a device's existing ESID if on these devices
- // telephonyService.getImei() actually returns non-null even when the device does not
- // declare FEATURE_TELEPHONY_GSM.
- imei = null;
- }
- mImei = imei;
+ mImei = telephonyService.getImei(0);
String meid;
try {
meid = telephonyService.getMeid(0);