aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Huang <yabinh@google.com>2021-06-29 04:23:06 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-06-29 04:23:06 +0000
commit6dfbc98673ea88e1bf1eddd04efad74770a0ec6f (patch)
treead8d4aa72f7f5c24180b32816d7e2e6239977dd3
parent358ff2b9bd6257637f9c848ea648941f62c0fd3b (diff)
parent8b41202d3979f1e7c53bb8c05277a3adf060d49c (diff)
downloadtests-6dfbc98673ea88e1bf1eddd04efad74770a0ec6f.tar.gz
Fix a crash when creating PendingIntent am: a1dfded1eb am: 8b41202d39
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Car/tests/+/15114492 Change-Id: I8a88c7376ad746f8a6506925fb032e656e1a1494
-rw-r--r--RotaryPlayground/src/com/android/car/rotaryplayground/HeadsUpNotificationFragment.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/RotaryPlayground/src/com/android/car/rotaryplayground/HeadsUpNotificationFragment.java b/RotaryPlayground/src/com/android/car/rotaryplayground/HeadsUpNotificationFragment.java
index 0744ac0..97c676e 100644
--- a/RotaryPlayground/src/com/android/car/rotaryplayground/HeadsUpNotificationFragment.java
+++ b/RotaryPlayground/src/com/android/car/rotaryplayground/HeadsUpNotificationFragment.java
@@ -62,7 +62,8 @@ public class HeadsUpNotificationFragment extends Fragment {
*/
private Notification createNotification() {
Intent intent = new Intent(getContext(), RotaryActivity.class);
- PendingIntent pendingIntent = PendingIntent.getActivity(getContext(), 0, intent, 0);
+ PendingIntent pendingIntent =
+ PendingIntent.getActivity(getContext(), 0, intent, PendingIntent.FLAG_IMMUTABLE);
return new Notification.Builder(getContext(), NOTIFICATION_CHANNEL_ID)
.setContentTitle("Example heads-up notification")
.setContentText("Try nudging up to HUN")