summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSohani Rao2017-08-22 15:45:43 -0500
committerSohani Rao2017-09-01 14:10:12 -0500
commit94abf86afd8ff688b2bc871b0e97820b0f6ace31 (patch)
treed7bb31f60c557a0331813f3419093bd3858ff841
parent7018247f52c2cf15d960b4b66bee7f1f75ff34ef (diff)
downloadsystem-connectivity-wificond-94abf86afd8ff688b2bc871b0e97820b0f6ace31.tar.gz
system-connectivity-wificond-94abf86afd8ff688b2bc871b0e97820b0f6ace31.tar.xz
system-connectivity-wificond-94abf86afd8ff688b2bc871b0e97820b0f6ace31.zip
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
-rw-r--r--Android.mk1
-rw-r--r--scanning/offload/offload_service_utils.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 163e3d1..5a5a078 100644
--- a/Android.mk
+++ b/Android.mk
@@ -200,6 +200,7 @@ LOCAL_SHARED_LIBRARIES := \
200 android.hardware.wifi.offload@1.0 \ 200 android.hardware.wifi.offload@1.0 \
201 libbase \ 201 libbase \
202 libbinder \ 202 libbinder \
203 libcutils \
203 libhidltransport \ 204 libhidltransport \
204 libhidlbase \ 205 libhidlbase \
205 libhwbinder \ 206 libhwbinder \
diff --git a/scanning/offload/offload_service_utils.cpp b/scanning/offload/offload_service_utils.cpp
index ce25d85..d91f069 100644
--- a/scanning/offload/offload_service_utils.cpp
+++ b/scanning/offload/offload_service_utils.cpp
@@ -16,6 +16,7 @@
16#include "wificond/scanning/offload/offload_service_utils.h" 16#include "wificond/scanning/offload/offload_service_utils.h"
17 17
18#include <android-base/logging.h> 18#include <android-base/logging.h>
19#include <cutils/properties.h>
19 20
20#include "wificond/scanning/offload/offload_scan_manager.h" 21#include "wificond/scanning/offload/offload_scan_manager.h"
21#include "wificond/scanning/scanner_impl.h" 22#include "wificond/scanning/scanner_impl.h"
@@ -40,6 +41,11 @@ OffloadDeathRecipient* OffloadServiceUtils::GetOffloadDeathRecipient(
40} 41}
41 42
42bool OffloadServiceUtils::IsOffloadScanSupported() const { 43bool 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 return false; 49 return false;
44} 50}
45 51