Skip to content

Commit

Permalink
Use FLAG_IMMUTABLE if needed
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky authored and backportbot[bot] committed Apr 4, 2024
1 parent 25a5054 commit fdd659e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fdd659e

Please sign in to comment.