summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-11-11 15:49:08 -0800
committerAdam Lesinski <adamlesinski@google.com>2015-12-15 21:18:01 +0000
commita9fa44d1d9c27b0456849421dbcab921c37c2a74 (patch)
treeed53b8704602c24e70f0ae58571a8b4563ffaac6 /service
parente26ad459b63271548abbdeba4f8d77fcca9f88bd (diff)
downloadframeworks_opt_net_wifi-a9fa44d1d9c27b0456849421dbcab921c37c2a74.tar.gz
frameworks_opt_net_wifi-a9fa44d1d9c27b0456849421dbcab921c37c2a74.tar.bz2
frameworks_opt_net_wifi-a9fa44d1d9c27b0456849421dbcab921c37c2a74.zip
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: Iac13583bd1ecf65513a7e655b46f6e19e588a99d (cherry picked from commit 60e5908f0df75b9fda15c325f279381783b5d07d)
Diffstat (limited to 'service')
-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 22ac645..521d705 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());
}