diff options
author | Adam Lesinski <adamlesinski@google.com> | 2015-11-11 15:49:08 -0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2016-02-24 13:21:18 -0800 |
commit | 76eb4f1ad5a51038c2d18fb9eb13d0e0ab6dfc60 (patch) | |
tree | 050c40b8996c6eb797fec2e28a00e2bc1003b850 | |
parent | 78ca9b3d6fb28abc6d52a31791f4b4084af76e65 (diff) | |
download | frameworks_opt_net_wifi-76eb4f1ad5a51038c2d18fb9eb13d0e0ab6dfc60.tar.gz frameworks_opt_net_wifi-76eb4f1ad5a51038c2d18fb9eb13d0e0ab6dfc60.tar.bz2 frameworks_opt_net_wifi-76eb4f1ad5a51038c2d18fb9eb13d0e0ab6dfc60.zip |
DO NOT MERGE ANYWHERE: Fix issue with WiFi scan reporting
Need to assign the overridden WorkSource to the member
mScanWorkSource in order to properly finish the scan.
Bug:23868900
Change-Id: I7c8ca5ce40ce1238e702bcc65dcef2b94b4b64e9
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index d85da64..706c08b 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -1919,14 +1919,13 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno || workSource != null)) { mScanWorkSource = workSource != null ? workSource : new WorkSource(callingUid); - WorkSource batteryWorkSource = mScanWorkSource; if (mScanWorkSource.size() == 1 && mScanWorkSource.get(0) < 0) { // WiFi uses negative UIDs to mean special things. BatteryStats don't care! - batteryWorkSource = new WorkSource(Process.WIFI_UID); + mScanWorkSource = new WorkSource(Process.WIFI_UID); } try { - mBatteryStats.noteWifiScanStartedFromSource(batteryWorkSource); + mBatteryStats.noteWifiScanStartedFromSource(mScanWorkSource); } catch (RemoteException e) { log(e.toString()); } |