fix more instances of PendingIntent

This commit is contained in:
Peter Cai 2021-10-14 20:23:33 -04:00
parent 1fd8670acb
commit 2dd11d074f
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ public class FreezeService extends Service {
notification.actions = new Notification.Action[] {
new Notification.Action.Builder(
null, getString(R.string.service_auto_freeze_now),
PendingIntent.getActivity(this, 0, intentFreeze, 0)
PendingIntent.getActivity(this, 0, intentFreeze, PendingIntent.FLAG_IMMUTABLE)
).build()
};

View File

@ -316,7 +316,7 @@ public class Utility {
.build();
Intent addIntent = shortcutManager.createShortcutResultIntent(info);
shortcutManager.requestPinShortcut(info,
PendingIntent.getBroadcast(context, 0, addIntent, 0).getIntentSender());
PendingIntent.getBroadcast(context, 0, addIntent, PendingIntent.FLAG_IMMUTABLE).getIntentSender());
} else {
// TODO: Maybe implement this for launchers without pin shortcut support?
// TODO: Should be the same with the fallback for Android < O