summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java8
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java4
2 files changed, 9 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index 9472367fb..8dcd1c19d 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -830,7 +830,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,
+ });
}
/**
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
index 6a7785e5e..0f48af9cc 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
@@ -4899,8 +4899,8 @@ public class WifiConfigManagerTest {
private int verifyNetworkInBroadcastAndReturnReason(WifiConfiguration configuration) {
ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
ArgumentCaptor<UserHandle> userHandleCaptor = ArgumentCaptor.forClass(UserHandle.class);
- mContextConfigStoreMockOrder.verify(mContext)
- .sendBroadcastAsUser(intentCaptor.capture(), userHandleCaptor.capture());
+ mContextConfigStoreMockOrder.verify(mContext).sendBroadcastAsUserMultiplePermissions(
+ intentCaptor.capture(), userHandleCaptor.capture(), any());
assertEquals(userHandleCaptor.getValue(), UserHandle.ALL);
Intent intent = intentCaptor.getValue();