summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2014-03-07 16:51:41 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2014-03-07 16:54:58 -0800
commitfcbced38a6a53c5fa31568417170afcf14d86ae6 (patch)
treef755964738f5c2974ec1ed685c0a5046b35df1c7 /services
parentf175b19aaac7ffe5553013d996a073693cac929d (diff)
downloadframeworks_base-fcbced38a6a53c5fa31568417170afcf14d86ae6.zip
frameworks_base-fcbced38a6a53c5fa31568417170afcf14d86ae6.tar.gz
frameworks_base-fcbced38a6a53c5fa31568417170afcf14d86ae6.tar.bz2
DO NOT MERGE Debounce wifi country code Info
We're getting signals from the radio and it sometimes drops out for a while. This change will delay applying an empty country code for 15sec but apply non-empty country codes immediately. It uses a sequence number so we only apply the most recent change, even if it's delayed. Also secures the wifi call to set the country code as we can't allow apps to set it willy-nilly. bug:11062898 Change-Id: I610039a833e26d4c5c8b7b9ac1b7546f3c83446a
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/wifi/WifiService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/wifi/WifiService.java b/services/java/com/android/server/wifi/WifiService.java
index f2efde1..aecf9ae 100644
--- a/services/java/com/android/server/wifi/WifiService.java
+++ b/services/java/com/android/server/wifi/WifiService.java
@@ -870,7 +870,7 @@ public final class WifiService extends IWifiManager.Stub {
public void setCountryCode(String countryCode, boolean persist) {
Slog.i(TAG, "WifiService trying to set country code to " + countryCode +
" with persist set to " + persist);
- enforceChangePermission();
+ enforceConnectivityInternalPermission();
final long token = Binder.clearCallingIdentity();
try {
mWifiStateMachine.setCountryCode(countryCode, persist);