summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2020-06-30 10:51:18 +0900
committerRemi NGUYEN VAN <reminv@google.com>2020-06-30 20:11:12 +0900
commit1acc0030a4655e31565a2307c8ccc550ed4c574b (patch)
treedf8150ca1baa7520ec5cf6dc5c75f369fcc01c1c /src
parentb8ac953af4ffc4a82fdc9a58f76fd96756c3cf49 (diff)
Use FLAG_IMMUTABLE on NetworkStackNotifier intents
FLAG_UPDATE_CURRENT was not helpful because: - For the venue info notification, the only extra is the Network, and the intent uses the network handle as identifier; meaning that two matching intents would already have the same extra. - The ACTION_WIFI_SETTINGS intent does not have any extra, so there is nothing to update. Bug: 157475111 Test: atest NetworkStackTests; manual: connected to captive portals and used notifications Change-Id: Ifd9e6ff04f2d574f3e28d612c8ea6215a209069e
Diffstat (limited to 'src')
-rw-r--r--src/com/android/networkstack/NetworkStackNotifier.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/networkstack/NetworkStackNotifier.java b/src/com/android/networkstack/NetworkStackNotifier.java
index 872834a..dbb62b1 100644
--- a/src/com/android/networkstack/NetworkStackNotifier.java
+++ b/src/com/android/networkstack/NetworkStackNotifier.java
@@ -239,7 +239,7 @@ public class NetworkStackNotifier {
.setContentText(res.getString(R.string.tap_for_info))
.setContentIntent(mDependencies.getActivityPendingIntent(
getContextAsUser(mContext, UserHandle.CURRENT),
- infoIntent, PendingIntent.FLAG_UPDATE_CURRENT));
+ infoIntent, PendingIntent.FLAG_IMMUTABLE));
networkStatus.mShownNotification = NOTE_VENUE_INFO;
} else if (showValidated) {
@@ -252,7 +252,7 @@ public class NetworkStackNotifier {
.setContentIntent(mDependencies.getActivityPendingIntent(
getContextAsUser(mContext, UserHandle.CURRENT),
new Intent(Settings.ACTION_WIFI_SETTINGS),
- PendingIntent.FLAG_UPDATE_CURRENT));
+ PendingIntent.FLAG_IMMUTABLE));
networkStatus.mShownNotification = NOTE_CONNECTED;
} else {