summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-11-11 15:49:08 -0800
committerThe Android Automerger <android-build@google.com>2016-02-24 13:21:18 -0800
commit76eb4f1ad5a51038c2d18fb9eb13d0e0ab6dfc60 (patch)
tree050c40b8996c6eb797fec2e28a00e2bc1003b850
parent78ca9b3d6fb28abc6d52a31791f4b4084af76e65 (diff)
downloadandroid_frameworks_opt_net_wifi-76eb4f1ad5a51038c2d18fb9eb13d0e0ab6dfc60.tar.gz
android_frameworks_opt_net_wifi-76eb4f1ad5a51038c2d18fb9eb13d0e0ab6dfc60.tar.bz2
android_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.java5
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 d85da64b8..706c08bcc 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());
}