summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorDavid Su <dysu@google.com>2020-03-09 16:12:15 -0700
committerDavid Su <dysu@google.com>2020-03-09 23:15:21 +0000
commit0b7409243bc82b767df334a39605e4f437ea3762 (patch)
tree2200a3070198fde9068ff865496b86a7c309bdb6 /service
parentddd7dec67cdbef7831588425b0632857d812d94c (diff)
WifiManager.getCountryCode(): check NETWORK_SETTINGS permission instead
This API is only called by Settings, so NETWORK_SETTINGS permission is more appropriate than NETWORK_STACK. Bug: 151091657 Test: Start Soft AP Change-Id: I714b344c213540dab33f20850afbb14bc077603d
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiServiceImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java
index 5c384f595..81e233cb2 100644
--- a/service/java/com/android/server/wifi/WifiServiceImpl.java
+++ b/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -2829,7 +2829,7 @@ public class WifiServiceImpl extends BaseWifiService {
*/
@Override
public String getCountryCode() {
- enforceNetworkStackPermission();
+ enforceNetworkSettingsPermission();
if (mVerboseLoggingEnabled) {
mLog.info("getCountryCode uid=%").c(Binder.getCallingUid()).flush();
}