diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2013-06-01 15:57:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-06-01 15:57:12 +0000 |
commit | 0161d229fdbd8407f5b8b783ffa02b145b0cef8e (patch) | |
tree | b5f5910a1d84dc53fbf39d878d3b51cc8e99df60 /services | |
parent | 8ebfb8c9c34caa80cd0d2451d950170c1b522f2a (diff) | |
parent | 304aad49cdd373f5081c7840f374baaf53122968 (diff) | |
download | frameworks_base-0161d229fdbd8407f5b8b783ffa02b145b0cef8e.zip frameworks_base-0161d229fdbd8407f5b8b783ffa02b145b0cef8e.tar.gz frameworks_base-0161d229fdbd8407f5b8b783ffa02b145b0cef8e.tar.bz2 |
Merge "Remember wifi country that's set before boot" into jb-mr2-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/wifi/WifiService.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/services/java/com/android/server/wifi/WifiService.java b/services/java/com/android/server/wifi/WifiService.java index 8ddc776..66ef978 100644 --- a/services/java/com/android/server/wifi/WifiService.java +++ b/services/java/com/android/server/wifi/WifiService.java @@ -651,7 +651,12 @@ public final class WifiService extends IWifiManager.Stub { Slog.i(TAG, "WifiService trying to set country code to " + countryCode + " with persist set to " + persist); enforceChangePermission(); - mWifiStateMachine.setCountryCode(countryCode, persist); + final long token = Binder.clearCallingIdentity(); + try { + mWifiStateMachine.setCountryCode(countryCode, persist); + } finally { + Binder.restoreCallingIdentity(token); + } } /** @@ -668,7 +673,12 @@ public final class WifiService extends IWifiManager.Stub { if (!isDualBandSupported()) return; Slog.i(TAG, "WifiService trying to set frequency band to " + band + " with persist set to " + persist); - mWifiStateMachine.setFrequencyBand(band, persist); + final long token = Binder.clearCallingIdentity(); + try { + mWifiStateMachine.setFrequencyBand(band, persist); + } finally { + Binder.restoreCallingIdentity(token); + } } |