summaryrefslogtreecommitdiff
path: root/ui/app-start-intent
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2021-10-28 23:20:23 +0200
committerByteHamster <info@bytehamster.com>2021-10-29 00:10:22 +0200
commitda50f4323234370ecd0209819f0c7c9c0705bdd2 (patch)
tree1e16f8fd10c875a46efb8c534295e3e4269b1959 /ui/app-start-intent
parent345aad4148f133477e40c232a8e855dfd28e0654 (diff)
downloadAntennaPod-da50f4323234370ecd0209819f0c7c9c0705bdd2.zip
Declare intent mutability for Android 12 compatibility
Diffstat (limited to 'ui/app-start-intent')
-rw-r--r--ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java5
-rw-r--r--ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/VideoPlayerActivityStarter.java4
2 files changed, 5 insertions, 4 deletions
diff --git a/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java b/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java
index 33f96f141..88c0378c1 100644
--- a/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java
+++ b/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java
@@ -3,6 +3,7 @@ package de.danoeh.antennapod.ui.appstartintent;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
+import android.os.Build;
/**
* Launches the main activity of the app with specific arguments.
@@ -26,8 +27,8 @@ public class MainActivityStarter {
}
public PendingIntent getPendingIntent() {
- return PendingIntent.getActivity(context, R.id.pending_intent_player_activity,
- getIntent(), PendingIntent.FLAG_UPDATE_CURRENT);
+ return PendingIntent.getActivity(context, R.id.pending_intent_player_activity, getIntent(),
+ PendingIntent.FLAG_UPDATE_CURRENT | (Build.VERSION.SDK_INT >= 23 ? PendingIntent.FLAG_IMMUTABLE : 0));
}
public void start() {
diff --git a/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/VideoPlayerActivityStarter.java b/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/VideoPlayerActivityStarter.java
index 7536d34b6..53f8719de 100644
--- a/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/VideoPlayerActivityStarter.java
+++ b/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/VideoPlayerActivityStarter.java
@@ -28,8 +28,8 @@ public class VideoPlayerActivityStarter {
}
public PendingIntent getPendingIntent() {
- return PendingIntent.getActivity(context, R.id.pending_intent_video_player,
- getIntent(), PendingIntent.FLAG_UPDATE_CURRENT);
+ return PendingIntent.getActivity(context, R.id.pending_intent_video_player, getIntent(),
+ PendingIntent.FLAG_UPDATE_CURRENT | (Build.VERSION.SDK_INT >= 23 ? PendingIntent.FLAG_IMMUTABLE : 0));
}
public void start() {