Merge "Change getSubIdForPhoneAccountHandle to getSubscriptionId" am: 0c0591473b

am: c020ac0261

Change-Id: Id2b92b5e7df5f45701b3204e03a0f1b1c4769980
This commit is contained in:
Shuo Qian
2019-11-11 15:02:18 -08:00
committed by android-build-merger
2 changed files with 4 additions and 4 deletions

View File

@@ -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);

View File

@@ -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;
}
@@ -9476,7 +9476,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();
@@ -9485,7 +9485,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;