summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-06-01 00:49:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-06-01 00:49:58 +0000
commit71d33fa108f651995ba0af00ad7b38749daef8dd (patch)
tree6834f56af58daa93a6c372a4a1a303bc8bbcc559 /service
parent0697df2e29a3255620760667e9192d82102cd85c (diff)
parent24dc6bb288a15516c89ab507bb86511556824144 (diff)
Merge "WifiScanningService: Don't cache results of partial scan" into oc-dev
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
index ef881dad6..d73bf053c 100644
--- a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
+++ b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
@@ -447,6 +447,7 @@ public class WifiScanningServiceImpl extends IWifiScanner.Stub {
private RequestList<ScanSettings> mActiveScans = new RequestList<>();
private RequestList<ScanSettings> mPendingScans = new RequestList<>();
+ // Scan results cached from the last full single scan request.
private ScanResult[] mCachedScanResults = new ScanResult[0];
WifiSingleScanStateMachine(Looper looper) {
@@ -879,8 +880,11 @@ public class WifiScanningServiceImpl extends IWifiScanner.Stub {
entry.reportEvent(WifiScanner.CMD_SCAN_RESULT, 0, parcelableAllResults);
}
- // Cache the results here so that apps can retrieve them.
- mCachedScanResults = results.getResults();
+ // Since we use NoBandChannelHelper, as long as a specific band is mentioned, the scan
+ // request is treated as full band (WifiScanner.WIFI_BAND_*).
+ if (results.isAllChannelsScanned()) {
+ mCachedScanResults = results.getResults();
+ }
sendScanResultBroadcast(true);
}