Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad6599ea authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Drop FEATURE_TELEPHONY_GSM from interface requirements

Bug: 367363970
Test: m
Flag: NONE removing exception
Change-Id: Id11dfbf02277f6dafac421bb68ffd75aed006c2a
parent b9a7ac0a
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -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());
    }
@@ -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;
@@ -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());
@@ -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();
@@ -19367,12 +19351,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();