summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2020-03-03 03:25:11 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-03-03 03:25:11 +0000
commitc49bed71ea1031bcdae26db6c415420248b7ffa4 (patch)
tree6651e70bb7b3c421b04c33e2355cbadcbaab1353
parent0c218cb23df088f732b9c46239c4ab727bc8c4a7 (diff)
parentb0dc5efd0d66313a8bbd870c4a762a68e4fc6ad0 (diff)
Merge "WifiServiceImpl: Clear calling identity before invoking Settings.put" into rvc-dev
-rw-r--r--service/java/com/android/server/wifi/WifiServiceImpl.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java
index eefe6ded7..4dc45946d 100644
--- a/service/java/com/android/server/wifi/WifiServiceImpl.java
+++ b/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -1904,8 +1904,13 @@ public class WifiServiceImpl extends BaseWifiService {
enforceNetworkSettingsPermission();
mLog.info("setScanAlwaysAvailable uid=%").c(Binder.getCallingUid()).flush();
mSettingsStore.handleWifiScanAlwaysAvailableToggled(isAvailable);
- mWifiInjector.getWifiScanAlwaysAvailableSettingsCompatibility()
- .handleWifiScanAlwaysAvailableToggled(isAvailable);
+ long ident = Binder.clearCallingIdentity();
+ try {
+ mWifiInjector.getWifiScanAlwaysAvailableSettingsCompatibility()
+ .handleWifiScanAlwaysAvailableToggled(isAvailable);
+ } finally {
+ Binder.restoreCallingIdentity(ident);
+ }
mActiveModeWarden.scanAlwaysModeChanged();
}