Merge changes Idc817611,Ic8160375
* changes:
Add VTS test for new settings enums
Add enum value for BT main / scanning toggle states
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Setting.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Setting.aidl
index 41bc9ae..d998478 100644
--- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Setting.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Setting.aidl
@@ -39,4 +39,6 @@
WIFI_SCANNING = 3,
AIRPLANE_MODE = 4,
MICROPHONE = 5,
+ BT_MAIN = 6,
+ BT_SCANNING = 7,
}
diff --git a/contexthub/aidl/android/hardware/contexthub/Setting.aidl b/contexthub/aidl/android/hardware/contexthub/Setting.aidl
index f2e55db..91d4c3f 100644
--- a/contexthub/aidl/android/hardware/contexthub/Setting.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/Setting.aidl
@@ -39,4 +39,12 @@
* by CHRE.
*/
MICROPHONE,
+ /**
+ * The main BT toggle in the Android settings for BT connectivity.
+ */
+ BT_MAIN,
+ /**
+ * The "BT scanning" setting for location scans.
+ */
+ BT_SCANNING,
}
diff --git a/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp b/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
index a47f64e..f0583be 100644
--- a/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
+++ b/contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp
@@ -300,6 +300,14 @@
testSettingChanged(Setting::MICROPHONE);
}
+TEST_P(ContextHubAidl, TestOnBtMainSettingChanged) {
+ testSettingChanged(Setting::BT_MAIN);
+}
+
+TEST_P(ContextHubAidl, TestOnBtScanningSettingChanged) {
+ testSettingChanged(Setting::BT_SCANNING);
+}
+
std::vector<std::tuple<std::string, int32_t>> generateContextHubMapping() {
std::vector<std::tuple<std::string, int32_t>> tuples;
auto contextHubAidlNames = android::getAidlHalInstanceNames(IContextHub::descriptor);