From 6a334ed1cbb609de0b94cffadf21f5142ebc0594 Mon Sep 17 00:00:00 2001 From: lesl Date: Mon, 30 Nov 2020 18:48:25 +0800 Subject: [PATCH] wifi: Add flag FLAG_IMMUTABLE in SAP notification In S, it requires to specify explicitly either FLAG_MUTABLE or FLAG_IMMUTABLE when creating a PendingIntent. The SoftAp Notification is used to notify user the configuration changed. And it supports to launch Setting page to show the current configuration. Based on the flag description, the FLAG_MUTABLE should be considered when the notification need to be used with inline reply or bubbles. But it is not the use case on SoftAp Notification. Use FLAG_IMMUTABLE. Bug: 171719799 Test: Manuel Test Change-Id: Id3df909f7754931e8018d7b8f6d07aba58158cbe --- .../providers/settings/WifiSoftApConfigChangedNotifier.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SettingsProvider/src/com/android/providers/settings/WifiSoftApConfigChangedNotifier.java b/packages/SettingsProvider/src/com/android/providers/settings/WifiSoftApConfigChangedNotifier.java index 5e5a9d9b2ec8c..c33f02dff5612 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/WifiSoftApConfigChangedNotifier.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/WifiSoftApConfigChangedNotifier.java @@ -82,6 +82,7 @@ public class WifiSoftApConfigChangedNotifier { private static PendingIntent getPendingActivity(Context context) { Intent intent = new Intent("com.android.settings.WIFI_TETHER_SETTINGS") .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); + return PendingIntent.getActivity(context, 0, intent, + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); } }