summaryrefslogtreecommitdiff
path: root/src/com/android/car
diff options
context:
space:
mode:
authorYabin Huang <yabinh@google.com>2021-06-25 16:15:37 -0700
committerYabin Huang <yabinh@google.com>2021-06-25 16:16:01 -0700
commit55bf2e77d4e54b0eee00e28bbd12bba1c3ab7730 (patch)
tree07b9563d344b937da0cd4a98a1e6f3312df4e41a /src/com/android/car
parent63a1c177ecb2dec75f689005911f82d6634fbe29 (diff)
downloadMessenger-55bf2e77d4e54b0eee00e28bbd12bba1c3ab7730.tar.gz
Specify FLAG_IMMUTABLE when creating PendingIntent
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: I2ab79dc4a0e6279676135a34ee8230190cbdd27e
Diffstat (limited to 'src/com/android/car')
-rw-r--r--src/com/android/car/messenger/core/util/VoiceUtil.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/car/messenger/core/util/VoiceUtil.java b/src/com/android/car/messenger/core/util/VoiceUtil.java
index cb02ee3..6ef246f 100644
--- a/src/com/android/car/messenger/core/util/VoiceUtil.java
+++ b/src/com/android/car/messenger/core/util/VoiceUtil.java
@@ -223,8 +223,8 @@ public class VoiceUtil {
int requestCode =
(conversationKey == null) ? action.hashCode() : conversationKey.hashCode();
- return PendingIntent.getForegroundService(
- context, requestCode, intent, PendingIntent.FLAG_ONE_SHOT);
+ return PendingIntent.getForegroundService(context, requestCode, intent,
+ PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_ONE_SHOT);
}
/** Sends a reply, meant to be used from a caller originating from voice input. */