system/connectivity/wificond
Revisión | 94abf86afd8ff688b2bc871b0e97820b0f6ace31 (tree) |
---|---|
Tiempo | 2017-09-02 04:10:12 |
Autor | Sohani Rao <sohanirao@goog...> |
Commiter | Sohani Rao |
Wificond: Provide a way to enable Offload scans
Enable use of adb shell setprop <property_string> <value> command
to enable using offload HAL for disconnected mode PNO scans.
Bug: 64944391
Test: Unit test and on device to test to ensure the command works
Change-Id: I911a15177f98be6040d161093bf4c97089973b9c
@@ -200,6 +200,7 @@ LOCAL_SHARED_LIBRARIES := \ | ||
200 | 200 | android.hardware.wifi.offload@1.0 \ |
201 | 201 | libbase \ |
202 | 202 | libbinder \ |
203 | + libcutils \ | |
203 | 204 | libhidltransport \ |
204 | 205 | libhidlbase \ |
205 | 206 | libhwbinder \ |
@@ -16,6 +16,7 @@ | ||
16 | 16 | #include "wificond/scanning/offload/offload_service_utils.h" |
17 | 17 | |
18 | 18 | #include <android-base/logging.h> |
19 | +#include <cutils/properties.h> | |
19 | 20 | |
20 | 21 | #include "wificond/scanning/offload/offload_scan_manager.h" |
21 | 22 | #include "wificond/scanning/scanner_impl.h" |
@@ -40,6 +41,11 @@ OffloadDeathRecipient* OffloadServiceUtils::GetOffloadDeathRecipient( | ||
40 | 41 | } |
41 | 42 | |
42 | 43 | bool OffloadServiceUtils::IsOffloadScanSupported() const { |
44 | + if (property_get_bool("persist.wifi.offload.enable", false)) { | |
45 | + LOG(INFO) << "Offload HAL supported"; | |
46 | + return true; | |
47 | + } | |
48 | + LOG(INFO) << "Offload HAL not supported "; | |
43 | 49 | return false; |
44 | 50 | } |
45 | 51 |