diff options
author | Roshan Pius <rpius@google.com> | 2017-06-01 00:49:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-06-01 00:49:58 +0000 |
commit | 71d33fa108f651995ba0af00ad7b38749daef8dd (patch) | |
tree | 6834f56af58daa93a6c372a4a1a303bc8bbcc559 /service | |
parent | 0697df2e29a3255620760667e9192d82102cd85c (diff) | |
parent | 24dc6bb288a15516c89ab507bb86511556824144 (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.java | 8 |
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); } |