OSDN Git Service

BluetoothAudio HAL: flip to be enabled by default
authorCheney Ni <cheneyni@google.com>
Sat, 23 Feb 2019 18:14:20 +0000 (02:14 +0800)
committerCheney Ni <cheneyni@google.com>
Wed, 27 Feb 2019 06:17:14 +0000 (14:17 +0800)
Bug: 126304229
Test: Switch BluetoothAudio HAL and A2DP offload manully
Change-Id: I26dc39fd5d483590f7cc9ae9bd5972f90719f93a

audio_hal_interface/a2dp_encoding.cc
audio_hal_interface/client_interface.h
audio_hal_interface/hearing_aid_software_encoding.cc

index 8c733c7..bdb46ae 100644 (file)
@@ -552,8 +552,7 @@ namespace a2dp {
 // Checking if new bluetooth_audio is supported
 bool is_hal_2_0_supported() {
   if (!is_configured) {
-    btaudio_a2dp_supported =
-        osi_property_get_bool(BLUETOOTH_AUDIO_PROP_ENABLED, false);
+    btaudio_a2dp_supported = !osi_property_get_bool(BLUETOOTH_AUDIO_HAL_PROP_DISABLED, false);
     is_configured = true;
   }
   return btaudio_a2dp_supported;
index 60af041..f5d21cd 100644 (file)
@@ -26,8 +26,7 @@
 
 #include "common/message_loop_thread.h"
 
-#define BLUETOOTH_AUDIO_PROP_ENABLED \
-  "persist.bluetooth.bluetooth_audio_hal.enabled"
+#define BLUETOOTH_AUDIO_HAL_PROP_DISABLED "persist.bluetooth.bluetooth_audio_hal.disabled"
 
 namespace bluetooth {
 namespace audio {
index c141104..78871ab 100644 (file)
@@ -142,8 +142,7 @@ namespace hearing_aid {
 
 bool is_hal_2_0_supported() {
   if (!is_configured) {
-    btaudio_hearing_aid_supported =
-        osi_property_get_bool(BLUETOOTH_AUDIO_PROP_ENABLED, false);
+    btaudio_hearing_aid_supported = !osi_property_get_bool(BLUETOOTH_AUDIO_HAL_PROP_DISABLED, false);
     is_configured = true;
   }
   return btaudio_hearing_aid_supported;