Merge "consistent permission check for getSubIdForPhoneAccount"
This commit is contained in:
@@ -11115,14 +11115,10 @@ public class TelephonyManager {
|
||||
@UnsupportedAppUsage
|
||||
public int getSubIdForPhoneAccount(@Nullable PhoneAccount phoneAccount) {
|
||||
int retval = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||
try {
|
||||
ITelephony service = getITelephony();
|
||||
if (service != null) {
|
||||
retval = service.getSubIdForPhoneAccount(phoneAccount);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
if (phoneAccount != null
|
||||
&& phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) {
|
||||
retval = getSubscriptionId(phoneAccount.getAccountHandle());
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -1353,11 +1353,6 @@ interface ITelephony {
|
||||
String getDeviceSoftwareVersionForSlot(int slotIndex, String callingPackage,
|
||||
String callingFeatureId);
|
||||
|
||||
/**
|
||||
* Returns the subscription ID associated with the specified PhoneAccount.
|
||||
*/
|
||||
int getSubIdForPhoneAccount(in PhoneAccount phoneAccount);
|
||||
|
||||
/**
|
||||
* Returns the subscription ID associated with the specified PhoneAccountHandle.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user