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

Commit f9a71e81 authored by Michele's avatar Michele
Browse files

Move the check on multisim support when switch configuration is done

The methods switchMultiSimConfig() and isMultisimSupported() in
TelephonyManager have different permissions. So, in order to check if
the switch operation can be performed, the check needs to be moved after
the verification of the permissions.

Bug: 124462964
Test: compilation
Change-Id: I501110d8b3fb2d26e4dfe187b52bb45dc8b5dc4b
parent 18900c46
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -10297,12 +10297,6 @@ public class TelephonyManager {
    @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
    @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
    public void switchMultiSimConfig(int numOfSims) {
        //only proceed if multi-sim is not restricted
        if (!isMultisimSupported()) {
            Rlog.e(TAG, "switchMultiSimConfig not possible. It is restricted or not supported.");
            return;
        }

        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {