summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorMichael Plass <mplass@google.com>2017-03-13 16:31:43 -0700
committerMichael Plass <mplass@google.com>2017-03-14 14:07:35 -0700
commit6ba8a37de432d957e10dd9cc74798758870d02e6 (patch)
tree6b195212ef103b489b5988b2f8fbeb15deebca1e /service
parenteb26485dd36b83676b4931e415f20b284abd7dfc (diff)
BgScan rename for wifi vendor background scan
Also clean up some stale todos Test: Unit tests pass Bug: 35806209 Bug: 34900537 stale todo fixed by b/35101185 Bug: 34901818 removed todo Bug: 34901744 retarget todo to b/35138520 Change-Id: I90a77a1aad7ff55c26ee70b383bcdbd16cac32cf
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiNative.java24
-rw-r--r--service/java/com/android/server/wifi/WifiVendorHal.java29
-rw-r--r--service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java12
-rw-r--r--service/java/com/android/server/wifi/scanner/WifiScannerImpl.java2
4 files changed, 33 insertions, 34 deletions
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java
index 134a90cd5..d8df0da72 100644
--- a/service/java/com/android/server/wifi/WifiNative.java
+++ b/service/java/com/android/server/wifi/WifiNative.java
@@ -1346,8 +1346,8 @@ public class WifiNative {
* @param capabilities object to be filled in
* @return true for success. false for failure
*/
- public boolean getScanCapabilities(ScanCapabilities capabilities) {
- return mWifiVendorHal.getScanCapabilities(capabilities);
+ public boolean getBgScanCapabilities(ScanCapabilities capabilities) {
+ return mWifiVendorHal.getBgScanCapabilities(capabilities);
}
public static class ChannelSettings {
@@ -1496,36 +1496,36 @@ public class WifiNative {
* @param eventHandler to call with the results
* @return true for success
*/
- public boolean startScan(ScanSettings settings, ScanEventHandler eventHandler) {
- return mWifiVendorHal.startScan(settings, eventHandler);
+ public boolean startBgScan(ScanSettings settings, ScanEventHandler eventHandler) {
+ return mWifiVendorHal.startBgScan(settings, eventHandler);
}
/**
* Stops any ongoing backgound scan
*/
- public void stopScan() {
- mWifiVendorHal.stopScan();
+ public void stopBgScan() {
+ mWifiVendorHal.stopBgScan();
}
/**
* Pauses an ongoing backgound scan
*/
- public void pauseScan() {
- mWifiVendorHal.pauseScan();
+ public void pauseBgScan() {
+ mWifiVendorHal.pauseBgScan();
}
/**
* Restarts a paused scan
*/
- public void restartScan() {
- mWifiVendorHal.restartScan();
+ public void restartBgScan() {
+ mWifiVendorHal.restartBgScan();
}
/**
* Gets the latest scan results received.
*/
- public WifiScanner.ScanData[] getScanResults(boolean flush) {
- return mWifiVendorHal.getScanResults();
+ public WifiScanner.ScanData[] getBgScanResults() {
+ return mWifiVendorHal.getBgScanResults();
}
public static interface HotlistEventHandler {
diff --git a/service/java/com/android/server/wifi/WifiVendorHal.java b/service/java/com/android/server/wifi/WifiVendorHal.java
index 0c1a56c46..36e1f3aec 100644
--- a/service/java/com/android/server/wifi/WifiVendorHal.java
+++ b/service/java/com/android/server/wifi/WifiVendorHal.java
@@ -394,9 +394,9 @@ public class WifiVendorHal {
* Gets the scan capabilities
*
* @param capabilities object to be filled in
- * @return true for success. false for failure
+ * @return true for success, false for failure
*/
- public boolean getScanCapabilities(WifiNative.ScanCapabilities capabilities) {
+ public boolean getBgScanCapabilities(WifiNative.ScanCapabilities capabilities) {
synchronized (sLock) {
if (mIWifiStaIface == null) return boolResult(false);
try {
@@ -540,15 +540,15 @@ public class WifiVendorHal {
/**
* Starts a background scan
- * <p>
+ *
* Any ongoing scan will be stopped first
*
* @param settings to control the scan
* @param eventHandler to call with the results
* @return true for success
*/
- public boolean startScan(WifiNative.ScanSettings settings,
- WifiNative.ScanEventHandler eventHandler) {
+ public boolean startBgScan(WifiNative.ScanSettings settings,
+ WifiNative.ScanEventHandler eventHandler) {
WifiStatus status;
if (eventHandler == null) return boolResult(false);
synchronized (sLock) {
@@ -576,7 +576,7 @@ public class WifiVendorHal {
/**
* Stops any ongoing backgound scan
*/
- public void stopScan() {
+ public void stopBgScan() {
WifiStatus status;
synchronized (sLock) {
if (mIWifiStaIface == null) return;
@@ -594,7 +594,7 @@ public class WifiVendorHal {
/**
* Pauses an ongoing backgound scan
*/
- public void pauseScan() {
+ public void pauseBgScan() {
WifiStatus status;
synchronized (sLock) {
try {
@@ -611,9 +611,9 @@ public class WifiVendorHal {
}
/**
- * Restarts a paused scan
+ * Restarts a paused background scan
*/
- public void restartScan() {
+ public void restartBgScan() {
WifiStatus status;
synchronized (sLock) {
if (mIWifiStaIface == null) return;
@@ -634,7 +634,7 @@ public class WifiVendorHal {
* TODO(b/35754840): This hop to fetch scan results after callback is unnecessary. Refactor
* WifiScanner to use the scan results from the callback.
*/
- public WifiScanner.ScanData[] getScanResults() {
+ public WifiScanner.ScanData[] getBgScanResults() {
synchronized (sLock) {
if (mIWifiStaIface == null) return null;
if (mScan == null) return null;
@@ -803,9 +803,8 @@ public class WifiVendorHal {
/**
* Get the supported features
- * <p>
- * Note that not all the WifiManager.WIFI_FEATURE_* bits are supplied through
- * this call. //TODO(b/34900537) fix this
+ *
+ * The result may differ depending on the mode (STA or AP)
*
* @return bitmask defined by WifiManager.WIFI_FEATURE_*
*/
@@ -923,7 +922,7 @@ public class WifiVendorHal {
ans.measurementFrameNumber = result.measurementNumber;
ans.successMeasurementFrameNumber = result.successNumber;
ans.frameNumberPerBurstPeer = result.numberPerBurstPeer;
- ans.status = result.status; //TODO(b/34901744) - don't assume identity translation
+ ans.status = result.status; //TODO(b/35138520) - don't assume identity translation
ans.retryAfterDuration = result.retryAfterDuration;
ans.measurementType = result.type;
ans.rssi = result.rssi;
@@ -1488,7 +1487,7 @@ public class WifiVendorHal {
* @return true for success
*/
public boolean installPacketFilter(byte[] filter) {
- int cmdId = 0; //TODO(b/34901818) We only aspire to support one program at a time
+ int cmdId = 0; // We only aspire to support one program at a time
if (filter == null) return boolResult(false);
// Copy the program before taking the lock.
ArrayList<Byte> program = NativeUtil.byteArrayToArrayList(filter);
diff --git a/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java b/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java
index 95528e252..3fb491ae5 100644
--- a/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java
+++ b/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java
@@ -66,7 +66,7 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb
@Override
public boolean getScanCapabilities(WifiNative.ScanCapabilities capabilities) {
- return mWifiNative.getScanCapabilities(capabilities);
+ return mWifiNative.getBgScanCapabilities(capabilities);
}
@Override
@@ -92,27 +92,27 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb
+ ",eventHandler=" + eventHandler);
return false;
}
- return mWifiNative.startScan(settings, eventHandler);
+ return mWifiNative.startBgScan(settings, eventHandler);
}
@Override
public void stopBatchedScan() {
- mWifiNative.stopScan();
+ mWifiNative.stopBgScan();
}
@Override
public void pauseBatchedScan() {
- mWifiNative.pauseScan();
+ mWifiNative.pauseBgScan();
}
@Override
public void restartBatchedScan() {
- mWifiNative.restartScan();
+ mWifiNative.restartBgScan();
}
@Override
public WifiScanner.ScanData[] getLatestBatchedScanResults(boolean flush) {
- return mWifiNative.getScanResults(flush);
+ return mWifiNative.getBgScanResults();
}
@Override
diff --git a/service/java/com/android/server/wifi/scanner/WifiScannerImpl.java b/service/java/com/android/server/wifi/scanner/WifiScannerImpl.java
index 98e87902a..5e1de30ef 100644
--- a/service/java/com/android/server/wifi/scanner/WifiScannerImpl.java
+++ b/service/java/com/android/server/wifi/scanner/WifiScannerImpl.java
@@ -48,7 +48,7 @@ public abstract class WifiScannerImpl {
public WifiScannerImpl create(Context context, Looper looper, Clock clock) {
WifiNative wifiNative = WifiInjector.getInstance().getWifiNative();
WifiMonitor wifiMonitor = WifiInjector.getInstance().getWifiMonitor();
- if (wifiNative.getScanCapabilities(new WifiNative.ScanCapabilities())) {
+ if (wifiNative.getBgScanCapabilities(new WifiNative.ScanCapabilities())) {
return new HalWifiScannerImpl(context, wifiNative, wifiMonitor, looper, clock);
} else {
return new WificondScannerImpl(context, wifiNative, wifiMonitor, looper,