mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-24 22:06:15 +03:00
Use FLAG_IMMUTABLE if needed
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
37e5ddfdb1
commit
bab350098d
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,9 @@ public class WidgetUtil {
|
||||||
* @return {@param flags} | {@link PendingIntent#FLAG_MUTABLE}
|
* @return {@param flags} | {@link PendingIntent#FLAG_MUTABLE}
|
||||||
*/
|
*/
|
||||||
public static int pendingIntentFlagCompat(int flags) {
|
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 | PendingIntent.FLAG_MUTABLE;
|
||||||
}
|
}
|
||||||
return flags;
|
return flags;
|
||||||
|
|
Loading…
Reference in a new issue