diff options
| author | 2017-06-13 15:28:57 -0700 | |
|---|---|---|
| committer | 2017-06-16 02:40:40 +0000 | |
| commit | b4c67ec3c85166a579612a563fc234ff326baedd (patch) | |
| tree | 8a7414773698f8d1a25248cf7a640e6e2455db6b | |
| parent | 647b11c97f475b0c407c6bcf36ff4a7462b4077e (diff) | |
Pass calling package to resolution UI.
The calling package is important for the UI to be able to tell the
user who is asking to perform the operation which needs consent. For
example, it should be able to tell the user which carrier app is
asking to download a profile.
Bug: 38049463
Test: TreeHugger + E2E verification
Change-Id: I890f811405cb05672e1271f092ddca60501e7ddc
3 files changed, 11 insertions, 4 deletions
diff --git a/core/java/android/service/euicc/EuiccService.java b/core/java/android/service/euicc/EuiccService.java index 8f61d965177e..24820aa48c1f 100644 --- a/core/java/android/service/euicc/EuiccService.java +++ b/core/java/android/service/euicc/EuiccService.java @@ -91,6 +91,10 @@ public abstract class EuiccService extends Service { public static final String ACTION_RESOLVE_NO_PRIVILEGES = "android.service.euicc.action.RESOLVE_NO_PRIVILEGES"; + /** Intent extra set for resolution requests containing the package name of the calling app. */ + public static final String EXTRA_RESOLUTION_CALLING_PACKAGE = + "android.service.euicc.extra.RESOLUTION_CALLING_PACKAGE"; + /** Result code for a successful operation. */ public static final int RESULT_OK = 0; /** Result code indicating that an active SIM must be deactivated to perform the operation. */ diff --git a/telephony/java/android/telephony/euicc/EuiccManager.java b/telephony/java/android/telephony/euicc/EuiccManager.java index 6367772b2001..61a99b5627cd 100644 --- a/telephony/java/android/telephony/euicc/EuiccManager.java +++ b/telephony/java/android/telephony/euicc/EuiccManager.java @@ -314,7 +314,8 @@ public class EuiccManager { return; } try { - mController.getDownloadableSubscriptionMetadata(subscription, callbackIntent); + mController.getDownloadableSubscriptionMetadata( + subscription, mContext.getOpPackageName(), callbackIntent); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -343,7 +344,8 @@ public class EuiccManager { return; } try { - mController.getDefaultDownloadableSubscriptionList(callbackIntent); + mController.getDefaultDownloadableSubscriptionList( + mContext.getOpPackageName(), callbackIntent); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } diff --git a/telephony/java/com/android/internal/telephony/euicc/IEuiccController.aidl b/telephony/java/com/android/internal/telephony/euicc/IEuiccController.aidl index 725b89bcf351..fa43631cee9e 100644 --- a/telephony/java/com/android/internal/telephony/euicc/IEuiccController.aidl +++ b/telephony/java/com/android/internal/telephony/euicc/IEuiccController.aidl @@ -26,8 +26,9 @@ import android.telephony.euicc.EuiccInfo; interface IEuiccController { oneway void continueOperation(in Intent resolutionIntent, in Bundle resolutionExtras); oneway void getDownloadableSubscriptionMetadata(in DownloadableSubscription subscription, - in PendingIntent callbackIntent); - oneway void getDefaultDownloadableSubscriptionList(in PendingIntent callbackIntent); + String callingPackage, in PendingIntent callbackIntent); + oneway void getDefaultDownloadableSubscriptionList( + String callingPackage, in PendingIntent callbackIntent); String getEid(); oneway void downloadSubscription(in DownloadableSubscription subscription, boolean switchAfterDownload, String callingPackage, in PendingIntent callbackIntent); |