Skip to content

Commit

Permalink
Merge pull request odemolliens#77 from raffiot/develop
Browse files Browse the repository at this point in the history
Create Pending Intent with mutable flag to receive EUICC manager callback on Android 14
  • Loading branch information
odemolliens authored Jul 29, 2024
2 parents 6a72966 + 03e9818 commit 7708874
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private void handleResolvableError(Promise promise, Intent intent) {
// FIXME: review logic of resolve functions
int resolutionRequestCode = 3;
PendingIntent callbackIntent = PendingIntent.getBroadcast(mReactContext, resolutionRequestCode,
new Intent(ACTION_DOWNLOAD_SUBSCRIPTION), PendingIntent.FLAG_UPDATE_CURRENT |
intent, PendingIntent.FLAG_UPDATE_CURRENT |
PendingIntent.FLAG_MUTABLE);

mgr.startResolutionActivity(mReactContext.getCurrentActivity(), resolutionRequestCode, intent, callbackIntent);
Expand Down Expand Up @@ -238,12 +238,13 @@ public void onReceive(Context context, Intent intent) {
/* Passed from react side */
config.getString("confirmationCode"));

Intent intent = new Intent(ACTION_DOWNLOAD_SUBSCRIPTION).setPackage(mReactContext.getPackageName());
PendingIntent callbackIntent = PendingIntent.getBroadcast(
mReactContext,
0,
new Intent(ACTION_DOWNLOAD_SUBSCRIPTION),
intent,
PendingIntent.FLAG_UPDATE_CURRENT |
PendingIntent.FLAG_IMMUTABLE);
PendingIntent.FLAG_MUTABLE);

mgr.downloadSubscription(sub, true, callbackIntent);
}
Expand Down

0 comments on commit 7708874

Please sign in to comment.