summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorDavid Su <dysu@google.com>2020-09-28 19:55:29 -0700
committerDavid Su <dysu@google.com>2020-09-30 17:05:04 +0000
commitff831c8e8dff31c14b418cce9cfd238f46f5152f (patch)
treeb0992f6bf01bea9362021c8cdd878a3acea57b76 /service
parentd1b35627abfe888e0a250206322bd9b8b76aeb52 (diff)
WifiConfigManager: protect CONFIGURED_NETWORKS_CHANGED_ACTION with permissions
Guard with ACCESS_WIFI_STATE & ACCESS_FINE_LOCATION permissions. Bug: 158874479 Bug: 159373687 Test: presubmit unit tests Test: Verify Settings still works correctly. Change-Id: I88d93006ff379105e13e1b339ec51757a56ac863 Merged-In: I657063f68701d57cfeb3765dfbab25ba50ef7b97
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index 7dc938b34..c06e80239 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -657,7 +657,13 @@ public class WifiConfigManager {
maskPasswordsInWifiConfiguration(broadcastNetwork);
intent.putExtra(WifiManager.EXTRA_WIFI_CONFIGURATION, broadcastNetwork);
intent.putExtra(WifiManager.EXTRA_CHANGE_REASON, reason);
- mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
+ mContext.sendBroadcastAsUserMultiplePermissions(
+ intent,
+ UserHandle.ALL,
+ new String[]{
+ android.Manifest.permission.ACCESS_WIFI_STATE,
+ android.Manifest.permission.ACCESS_FINE_LOCATION,
+ });
}
/**