summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Huang <yabinh@google.com>2021-06-25 16:20:23 -0700
committerYabin Huang <yabinh@google.com>2021-06-25 16:20:23 -0700
commit6f7d23a5039e20e13180a6dc0f1bcfb8fd76b8b7 (patch)
treeeb245a3f4bd1ee407d13573318e21184366c3f71
parent8c7ce10080f2fd369327100e22a89f5bccaf0227 (diff)
downloadSystemUpdater-6f7d23a5039e20e13180a6dc0f1bcfb8fd76b8b7.tar.gz
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. So this CL uses FLAG_IMMUTABLE to create the PendingIntent because the flag is recommended in most cases. Bug: 192103710 Test: manual Change-Id: I4c9076e10ee6a6227ae9daea1e2f2ad3363671b8
-rw-r--r--src/com/android/car/systemupdater/UpdateLayoutFragment.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/car/systemupdater/UpdateLayoutFragment.java b/src/com/android/car/systemupdater/UpdateLayoutFragment.java
index ff56371..0ba5b90 100644
--- a/src/com/android/car/systemupdater/UpdateLayoutFragment.java
+++ b/src/com/android/car/systemupdater/UpdateLayoutFragment.java
@@ -279,7 +279,7 @@ public class UpdateLayoutFragment extends Fragment implements UpFragment {
context,
/* requestCode= */ 0,
intent,
- PendingIntent.FLAG_UPDATE_CURRENT);
+ PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
return new Notification.Builder(context, NOTIFICATION_CHANNEL_ID)
.setVisibility(Notification.VISIBILITY_PUBLIC)