From 0b7409243bc82b767df334a39605e4f437ea3762 Mon Sep 17 00:00:00 2001 From: David Su Date: Mon, 9 Mar 2020 16:12:15 -0700 Subject: 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 --- service/java/com/android/server/wifi/WifiServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'service') 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(); } -- cgit v1.2.3