Similar to this question, but not the same
After update to Android 12 (SDK 31) we change PendingIntent.getActivity(context, 0, intent, 0) to PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE) like suggested.
But PendingIntent.FLAG_IMMUTABLE is not available for SDK under 23. If I add if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) to keep both versions, I stay with the lint warning about not using the correct flag for the else case.
What is the expected behaviour here? Thanks!