diff options
author | Ningyuan Wang <nywang@google.com> | 2017-08-17 15:31:57 -0700 |
---|---|---|
committer | Ningyuan Wang <nywang@google.com> | 2017-08-17 15:31:57 -0700 |
commit | 71c03a90e2799cf95c1925431059057e80690cca (patch) | |
tree | 9ce1fdfa8bb21bcaeff1b588b09cc1994b04b76a /service | |
parent | 690c99175ebfb3aa2ca92d2100f2a5148f081646 (diff) |
Cleanup code for HAL based PNO
Bug: 64810639
Test: compile, unit tests
Change-Id: I962fc3dcecc4dd3330957318db35285981b1e979
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiNative.java | 20 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java | 28 |
2 files changed, 4 insertions, 44 deletions
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java index 1d6c9d4af..5b12a3648 100644 --- a/service/java/com/android/server/wifi/WifiNative.java +++ b/service/java/com/android/server/wifi/WifiNative.java @@ -1545,26 +1545,6 @@ public class WifiNative { } /** - * Set the PNO settings & the network list in HAL to start PNO. - * @param settings PNO settings and network list. - * @param eventHandler Handler to receive notifications back during PNO scan. - * @return true if success, false otherwise - */ - public boolean setPnoList(PnoSettings settings, PnoEventHandler eventHandler) { - Log.e(mTAG, "setPnoList not supported"); - return false; - } - - /** - * Reset the PNO settings in HAL to stop PNO. - * @return true if success, false otherwise - */ - public boolean resetPnoList() { - Log.e(mTAG, "resetPnoList not supported"); - return false; - } - - /** * Start sending the specified keep alive packets periodically. * * @param slot Integer used to identify each request. diff --git a/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java b/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java index 0fadd804b..7d0ccbaf6 100644 --- a/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java +++ b/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java @@ -42,7 +42,6 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb private final WifiNative mWifiNative; private final ChannelHelper mChannelHelper; private final WificondScannerImpl mWificondScannerDelegate; - private final boolean mHalBasedPnoSupported; public HalWifiScannerImpl(Context context, WifiNative wifiNative, WifiMonitor wifiMonitor, Looper looper, Clock clock) { @@ -51,9 +50,6 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb mWificondScannerDelegate = new WificondScannerImpl(context, wifiNative, wifiMonitor, mChannelHelper, looper, clock); - - // We are not going to support HAL ePNO currently. - mHalBasedPnoSupported = false; } @Override @@ -121,38 +117,22 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb @Override public boolean setHwPnoList(WifiNative.PnoSettings settings, WifiNative.PnoEventHandler eventHandler) { - if (mHalBasedPnoSupported) { - return mWifiNative.setPnoList(settings, eventHandler); - } else { - return mWificondScannerDelegate.setHwPnoList(settings, eventHandler); - } + return mWificondScannerDelegate.setHwPnoList(settings, eventHandler); } @Override public boolean resetHwPnoList() { - if (mHalBasedPnoSupported) { - return mWifiNative.resetPnoList(); - } else { - return mWificondScannerDelegate.resetHwPnoList(); - } + return mWificondScannerDelegate.resetHwPnoList(); } @Override public boolean isHwPnoSupported(boolean isConnectedPno) { - if (mHalBasedPnoSupported) { - return true; - } else { - return mWificondScannerDelegate.isHwPnoSupported(isConnectedPno); - } + return mWificondScannerDelegate.isHwPnoSupported(isConnectedPno); } @Override public boolean shouldScheduleBackgroundScanForHwPno() { - if (mHalBasedPnoSupported) { - return true; - } else { - return mWificondScannerDelegate.shouldScheduleBackgroundScanForHwPno(); - } + return mWificondScannerDelegate.shouldScheduleBackgroundScanForHwPno(); } @Override |