Loading telephony/java/android/telephony/TelephonyManager.java +0 −19 Original line number Diff line number Diff line Loading @@ -2298,13 +2298,9 @@ public class TelephonyManager { * * See {@link #getImei(int)} for details on the required permissions and behavior * when the caller does not hold sufficient permissions. * * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. */ @SuppressAutoDoc // No support for device / profile owner or carrier privileges (b/72967236). @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) public String getImei() { return getImei(getSlotIndex()); } Loading Loading @@ -2343,13 +2339,9 @@ public class TelephonyManager { * </ul> * * @param slotIndex of which IMEI is returned * * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. */ @SuppressAutoDoc // No support for device / profile owner or carrier privileges (b/72967236). @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) public String getImei(int slotIndex) { ITelephony telephony = getITelephony(); if (telephony == null) return null; Loading @@ -2366,11 +2358,7 @@ public class TelephonyManager { /** * Returns the Type Allocation Code from the IMEI. Return null if Type Allocation Code is not * available. * * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. */ @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) @Nullable public String getTypeAllocationCode() { return getTypeAllocationCode(getSlotIndex()); Loading @@ -2381,11 +2369,7 @@ public class TelephonyManager { * available. * * @param slotIndex of which Type Allocation Code is returned * * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. */ @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) @Nullable public String getTypeAllocationCode(int slotIndex) { ITelephony telephony = getITelephony(); Loading Loading @@ -19378,12 +19362,9 @@ public class TelephonyManager { * </ul> * * @return Primary IMEI of type string * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. * @throws SecurityException if the caller does not have the required permission/privileges */ @NonNull @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) public String getPrimaryImei() { try { ITelephony telephony = getITelephony(); Loading
telephony/java/android/telephony/TelephonyManager.java +0 −19 Original line number Diff line number Diff line Loading @@ -2298,13 +2298,9 @@ public class TelephonyManager { * * See {@link #getImei(int)} for details on the required permissions and behavior * when the caller does not hold sufficient permissions. * * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. */ @SuppressAutoDoc // No support for device / profile owner or carrier privileges (b/72967236). @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) public String getImei() { return getImei(getSlotIndex()); } Loading Loading @@ -2343,13 +2339,9 @@ public class TelephonyManager { * </ul> * * @param slotIndex of which IMEI is returned * * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. */ @SuppressAutoDoc // No support for device / profile owner or carrier privileges (b/72967236). @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) public String getImei(int slotIndex) { ITelephony telephony = getITelephony(); if (telephony == null) return null; Loading @@ -2366,11 +2358,7 @@ public class TelephonyManager { /** * Returns the Type Allocation Code from the IMEI. Return null if Type Allocation Code is not * available. * * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. */ @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) @Nullable public String getTypeAllocationCode() { return getTypeAllocationCode(getSlotIndex()); Loading @@ -2381,11 +2369,7 @@ public class TelephonyManager { * available. * * @param slotIndex of which Type Allocation Code is returned * * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. */ @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) @Nullable public String getTypeAllocationCode(int slotIndex) { ITelephony telephony = getITelephony(); Loading Loading @@ -19378,12 +19362,9 @@ public class TelephonyManager { * </ul> * * @return Primary IMEI of type string * @throws UnsupportedOperationException If the device does not have * {@link PackageManager#FEATURE_TELEPHONY_GSM}. * @throws SecurityException if the caller does not have the required permission/privileges */ @NonNull @RequiresFeature(PackageManager.FEATURE_TELEPHONY_GSM) public String getPrimaryImei() { try { ITelephony telephony = getITelephony();