Make pendingintent use immutable flag

It will be required for S+ that every PendingIntent be declared
mutable or immutable.

Fixes: 169792037
Test: manual
Change-Id: I4212c232abb061b06cbd5520ea548318f43549de
This commit is contained in:
Matt Pietal
2020-10-19 14:45:24 -04:00
parent 58b2025873
commit ed801851b3

View File

@@ -316,7 +316,8 @@ public class KeyguardSliceProvider extends SliceProvider implements
}
mDatePattern = getContext().getString(R.string.system_ui_aod_date_pattern);
mPendingIntent = PendingIntent.getActivity(getContext(), 0,
new Intent(getContext(), KeyguardSliceProvider.class), 0);
new Intent(getContext(), KeyguardSliceProvider.class),
PendingIntent.FLAG_IMMUTABLE);
try {
//TODO(b/168778439): Remove this whole try catch. This is for debugging in dogfood.
mMediaManager.addCallback(this);