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)
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 @@
                 || 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());
             }