mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 10:44:41 +00:00
Update ContextHub HAL 1.2
Update ContextHub HAL 1.2 to include support for the Global Microphone Access Disable user setting. Bug: 174691697 Test: run vts -m VtsHalContexthubV1_2TargetTest -t ContexthubHidlTest Change-Id: I11bce59069fa97010b66f194a9ccc01a5b81f808
This commit is contained in:
@@ -33,6 +33,12 @@ enum Setting : @1.1::Setting {
|
||||
*/
|
||||
WIFI_AVAILABLE,
|
||||
AIRPLANE_MODE,
|
||||
|
||||
/**
|
||||
* Indicates if the microphone access was turned off globally by the user,
|
||||
* in which case audio data cannot be used and propagated by CHRE.
|
||||
*/
|
||||
GLOBAL_MIC_DISABLE,
|
||||
};
|
||||
|
||||
struct ContextHubMsg {
|
||||
|
||||
@@ -62,6 +62,13 @@ TEST_P(ContexthubHidlTest, TestOnAirplaneModeSettingChanged) {
|
||||
ASSERT_OK(registerCallback(nullptr));
|
||||
}
|
||||
|
||||
TEST_P(ContexthubHidlTest, TestOnGlobalMicDisableSettingChanged) {
|
||||
ASSERT_OK(registerCallback(new ContexthubCallbackBase()));
|
||||
hubApi->onSettingChanged_1_2(Setting::GLOBAL_MIC_DISABLE, SettingValue::DISABLED);
|
||||
hubApi->onSettingChanged_1_2(Setting::GLOBAL_MIC_DISABLE, SettingValue::ENABLED);
|
||||
ASSERT_OK(registerCallback(nullptr));
|
||||
}
|
||||
|
||||
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ContexthubHidlTest);
|
||||
INSTANTIATE_TEST_SUITE_P(HubIdSpecificTests, ContexthubHidlTest, testing::ValuesIn(kTestParameters),
|
||||
android::hardware::PrintInstanceTupleNameToString<>);
|
||||
|
||||
Reference in New Issue
Block a user