diff options
| author | 2019-11-11 14:47:24 -0800 | |
|---|---|---|
| committer | 2019-11-11 14:47:24 -0800 | |
| commit | c020ac0261e1fb6e8378adba64c80df3d1fa0b6d (patch) | |
| tree | 67756cf8f706aef1e376ea928c3d587f36206d4a | |
| parent | 196c55dd13cbe6e5c782fd723ed31212b1c34073 (diff) | |
| parent | 0c0591473b1a182f9ad8711e1e13bed870e3536a (diff) | |
Merge "Change getSubIdForPhoneAccountHandle to getSubscriptionId"
am: 0c0591473b
Change-Id: I2a5d24a2eca31e6e99f9bc794fdf854ac96e4ece
| -rw-r--r-- | api/current.txt | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt index ce4cb250e795..b1092d72f4d1 100644 --- a/api/current.txt +++ b/api/current.txt @@ -45075,8 +45075,8 @@ package android.telephony { method @Nullable public CharSequence getSimSpecificCarrierIdName(); method public int getSimState(); method public int getSimState(int); - method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public int getSubIdForPhoneAccountHandle(@NonNull android.telecom.PhoneAccountHandle); method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public String getSubscriberId(); + method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public int getSubscriptionId(@NonNull android.telecom.PhoneAccountHandle); method public int getSupportedModemCount(); method @Nullable public String getTypeAllocationCode(); method @Nullable public String getTypeAllocationCode(int); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index e46bccda8480..17ef4bc8d472 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -477,7 +477,7 @@ public class TelephonyManager { */ @Nullable public TelephonyManager createForPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) { - int subId = getSubIdForPhoneAccountHandle(phoneAccountHandle); + int subId = getSubscriptionId(phoneAccountHandle); if (!SubscriptionManager.isValidSubscriptionId(subId)) { return null; } @@ -9471,7 +9471,7 @@ public class TelephonyManager { * permission. */ @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) - public int getSubIdForPhoneAccountHandle(@NonNull PhoneAccountHandle phoneAccountHandle) { + public int getSubscriptionId(@NonNull PhoneAccountHandle phoneAccountHandle) { int retval = SubscriptionManager.INVALID_SUBSCRIPTION_ID; try { ITelephony service = getITelephony(); @@ -9480,7 +9480,7 @@ public class TelephonyManager { phoneAccountHandle, mContext.getOpPackageName()); } } catch (RemoteException ex) { - Log.e(TAG, "getSubIdForPhoneAccountHandle RemoteException", ex); + Log.e(TAG, "getSubscriptionId RemoteException", ex); ex.rethrowAsRuntimeException(); } return retval; |