diff options
author | cyBerta <cyberta@riseup.net> | 2022-08-08 22:59:50 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2022-08-08 22:59:50 +0200 |
commit | 6d705263bf0fd616926d2c64ada98e2ee7740024 (patch) | |
tree | fbf62008d9bc382dd4945ac9729f7347c5c57fa1 /app/src/fatweb | |
parent | fa5beea3c70a5e20304953b8dbf778ca8f338536 (diff) |
set IMMUTABLE flags for PendingIntents on Android 12+
Diffstat (limited to 'app/src/fatweb')
-rw-r--r-- | app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java index 336802c6..687fc66a 100644 --- a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java +++ b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java @@ -33,6 +33,7 @@ import se.leap.bitmaskclient.R; import static android.content.Intent.CATEGORY_DEFAULT; import static se.leap.bitmaskclient.appUpdate.DownloadBroadcastReceiver.ACTION_DOWNLOAD; +import static se.leap.bitmaskclient.base.utils.ConfigHelper.getPendingIntentFlags; public class DownloadNotificationManager { private Context context; @@ -130,12 +131,13 @@ public class DownloadNotificationManager { private PendingIntent getDownloadIntent() { Intent downloadIntent = new Intent(context, DownloadBroadcastReceiver.class); downloadIntent.setAction(ACTION_DOWNLOAD); - return PendingIntent.getBroadcast(context, 0, downloadIntent, PendingIntent.FLAG_CANCEL_CURRENT); + + return PendingIntent.getBroadcast(context, 0, downloadIntent, getPendingIntentFlags()); } private PendingIntent getInstallIntent() { Intent installIntent = new Intent(context, InstallActivity.class); - return PendingIntent.getActivity(context, 0, installIntent, PendingIntent.FLAG_CANCEL_CURRENT); + return PendingIntent.getActivity(context, 0, installIntent, getPendingIntentFlags()); } public void cancelNotifications() { |