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

Commit 4ffff831 authored by Nancy Chen's avatar Nancy Chen Committed by Android (Google) Code Review
Browse files

Merge "Handle MMI for multi-SIM (2/3)" into lmp-mr1-dev

parents 6e2b94ea 3ab204c1
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -461,6 +461,27 @@ public class TelecomServiceImpl extends ITelecomService.Stub {
        return retval;
    }

    /**
     * @see android.telecom.TelecomManager#handleMmi
     */
    @Override
    public boolean handlePinMmiForPhoneAccount(PhoneAccountHandle accountHandle,
            String dialString) {
        enforceModifyPermissionOrDefaultDialer();

        // Switch identity so that TelephonyManager checks Telecom's permissions instead.
        long token = Binder.clearCallingIdentity();
        boolean retval = false;
        try {
            int subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle);
            retval = getTelephonyManager().handlePinMmiForSubscriber(subId, dialString);
        } finally {
            Binder.restoreCallingIdentity(token);
        }

        return retval;
    }

    /**
     * @see android.telecom.TelecomManager#isTtySupported
     */