From f9a71e81eee592dc48c90237c060f7624757cfb2 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 1 Mar 2019 13:01:51 -0800 Subject: 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 --- telephony/java/android/telephony/TelephonyManager.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 29a305e8b131..2ac735d30482 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -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) { -- cgit v1.2.3-59-g8ed1b