Browse Source

fix more instances of PendingIntent

master
Peter Cai 2 months ago
parent
commit
2dd11d074f
  1. 2
      app/src/main/java/net/typeblog/shelter/services/FreezeService.java
  2. 2
      app/src/main/java/net/typeblog/shelter/util/Utility.java

2
app/src/main/java/net/typeblog/shelter/services/FreezeService.java

@ -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()
};

2
app/src/main/java/net/typeblog/shelter/util/Utility.java

@ -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

Loading…
Cancel
Save