summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2020-11-17 13:22:19 -0800
committerRoshan Pius <rpius@google.com>2020-12-02 23:49:16 +0000
commitf66c83ebd45a367c609ed7c7443113faa667504e (patch)
tree6a05f3af892ab189d781aa4f4e311b37d32b3b97 /service
parent1ec2db948040a932431f5d86b62def985d95d9c7 (diff)
ConnectToNetworkNotification: Disallow connect from lock screen
Avoids malicious usage of the notification to add a saved wifi network without unlocking the device. Bug: 172584372 Test: Manual: ONA notification not shown in the lockscreen. Visible when the device is unlocked. Change-Id: I760cd4303b846a214737edc49254f6327e05d357 Merged-In: I760cd4303b846a214737edc49254f6327e05d357 (cherry picked from commit ec2ba25598cec3403460ee6d5f6b74399fbca598)
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java b/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java
index 4f7b4e820..053314dc7 100644
--- a/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java
+++ b/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java
@@ -16,6 +16,8 @@
package com.android.server.wifi;
+import static android.app.Notification.VISIBILITY_SECRET;
+
import android.app.Notification;
import android.app.PendingIntent;
import android.content.Intent;
@@ -95,6 +97,7 @@ public class ConnectToNetworkNotificationBuilder {
.setContentIntent(getPrivateBroadcast(ACTION_PICK_WIFI_NETWORK, notifierTag))
.addAction(connectAction)
.addAction(allNetworksAction)
+ .setVisibility(VISIBILITY_SECRET)
.build();
}