Merge "Change getSubIdForPhoneAccountHandle to getSubscriptionId"
This commit is contained in:
@@ -45075,8 +45075,8 @@ package android.telephony {
|
|||||||
method @Nullable public CharSequence getSimSpecificCarrierIdName();
|
method @Nullable public CharSequence getSimSpecificCarrierIdName();
|
||||||
method public int getSimState();
|
method public int getSimState();
|
||||||
method public int getSimState(int);
|
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.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 public int getSupportedModemCount();
|
||||||
method @Nullable public String getTypeAllocationCode();
|
method @Nullable public String getTypeAllocationCode();
|
||||||
method @Nullable public String getTypeAllocationCode(int);
|
method @Nullable public String getTypeAllocationCode(int);
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ public class TelephonyManager {
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public TelephonyManager createForPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) {
|
public TelephonyManager createForPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) {
|
||||||
int subId = getSubIdForPhoneAccountHandle(phoneAccountHandle);
|
int subId = getSubscriptionId(phoneAccountHandle);
|
||||||
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
|
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -9471,7 +9471,7 @@ public class TelephonyManager {
|
|||||||
* permission.
|
* permission.
|
||||||
*/
|
*/
|
||||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
@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;
|
int retval = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||||
try {
|
try {
|
||||||
ITelephony service = getITelephony();
|
ITelephony service = getITelephony();
|
||||||
@@ -9480,7 +9480,7 @@ public class TelephonyManager {
|
|||||||
phoneAccountHandle, mContext.getOpPackageName());
|
phoneAccountHandle, mContext.getOpPackageName());
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
Log.e(TAG, "getSubIdForPhoneAccountHandle RemoteException", ex);
|
Log.e(TAG, "getSubscriptionId RemoteException", ex);
|
||||||
ex.rethrowAsRuntimeException();
|
ex.rethrowAsRuntimeException();
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
|
|||||||
Reference in New Issue
Block a user