Merge "Handle permission check for multi-active SIMs devices."
am: 2638587995
Change-Id: Ibc492399e3b083fe1781eae706ea00416e48429e
This commit is contained in:
@@ -309,7 +309,7 @@ public class EuiccManager {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return getIEuiccController().getEid(mCardId);
|
||||
return getIEuiccController().getEid(mCardId, mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
@@ -347,6 +347,15 @@ public class EuiccManager {
|
||||
* Without the former, an {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} will be
|
||||
* returned in the callback intent to prompt the user to accept the download.
|
||||
*
|
||||
* <p>On a multi-active SIM device, requires the
|
||||
* {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission, or a calling app
|
||||
* only if the targeted eUICC does not currently have an active subscription or the calling app
|
||||
* is authorized to manage the active subscription on the target eUICC, and the calling app is
|
||||
* authorized to manage any active subscription on any SIM. Without it, an
|
||||
* {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} will be returned in the callback
|
||||
* intent to prompt the user to accept the download. The caller should also be authorized to
|
||||
* manage the subscription to be downloaded.
|
||||
*
|
||||
* @param subscription the subscription to download.
|
||||
* @param switchAfterDownload if true, the profile will be activated upon successful download.
|
||||
* @param callbackIntent a PendingIntent to launch when the operation completes.
|
||||
@@ -549,9 +558,21 @@ public class EuiccManager {
|
||||
* an {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} will be returned in the callback
|
||||
* intent to prompt the user to accept the download.
|
||||
*
|
||||
* <p>On a multi-active SIM device, requires the
|
||||
* {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission, or a calling app
|
||||
* only if the targeted eUICC does not currently have an active subscription or the calling app
|
||||
* is authorized to manage the active subscription on the target eUICC, and the calling app is
|
||||
* authorized to manage any active subscription on any SIM. Without it, an
|
||||
* {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} will be returned in the callback
|
||||
* intent to prompt the user to accept the download. The caller should also be authorized to
|
||||
* manage the subscription to be enabled.
|
||||
*
|
||||
* @param subscriptionId the ID of the subscription to enable. May be
|
||||
* {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID} to deactivate the
|
||||
* current profile without activating another profile to replace it.
|
||||
* current profile without activating another profile to replace it. If it's a disable
|
||||
* operation, requires the {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS}
|
||||
* permission, or the calling app must be authorized to manage the active subscription on
|
||||
* the target eUICC.
|
||||
* @param callbackIntent a PendingIntent to launch when the operation completes.
|
||||
*/
|
||||
@RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
|
||||
|
||||
@@ -31,7 +31,7 @@ interface IEuiccController {
|
||||
String callingPackage, in PendingIntent callbackIntent);
|
||||
oneway void getDefaultDownloadableSubscriptionList(int cardId,
|
||||
String callingPackage, in PendingIntent callbackIntent);
|
||||
String getEid(int cardId);
|
||||
String getEid(int cardId, String callingPackage);
|
||||
int getOtaStatus(int cardId);
|
||||
oneway void downloadSubscription(int cardId, in DownloadableSubscription subscription,
|
||||
boolean switchAfterDownload, String callingPackage, in Bundle resolvedBundle,
|
||||
|
||||
Reference in New Issue
Block a user