From fdd659ebea59f79ffe6a7771152858ec4251051f Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 4 Apr 2024 15:01:13 +0200 Subject: [PATCH] Use FLAG_IMMUTABLE if needed Signed-off-by: tobiasKaminsky --- .../it/niedermann/owncloud/notes/shared/util/WidgetUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/WidgetUtil.java b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/WidgetUtil.java index dc53fb3f4..a5984aa27 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/shared/util/WidgetUtil.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/shared/util/WidgetUtil.java @@ -22,7 +22,9 @@ private WidgetUtil() { * @return {@param flags} | {@link PendingIntent#FLAG_MUTABLE} */ public static int pendingIntentFlagCompat(int flags) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + return flags | PendingIntent.FLAG_IMMUTABLE; + } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { return flags | PendingIntent.FLAG_MUTABLE; } return flags;