Loading system/bta/BUILD.gn +6 −1 Original line number Diff line number Diff line Loading @@ -112,11 +112,16 @@ static_library("bta") { "//vnd/include", ] # TODO(armansito): Remove all of the flags below, since we want to enable all # warnings. cflags = [ "-Wno-unused-variable", "-Wno-unused-value", "-Wno-unused-function", "-Wno-pointer-to-int-cast", "-Wno-int-to-pointer-cast", ] cflags_c = [ "-Wno-pointer-to-int-cast", ] } system/bta/hf_client/bta_hf_client_main.c +17 −0 Original line number Diff line number Diff line Loading @@ -19,7 +19,14 @@ #include <string.h> #include <stdlib.h> // TODO(armansito): cutils/properties.h is only being used to pull-in runtime // settings on Android. Remove this conditional include once we have a generic // way to obtain system properties. #if !defined(OS_GENERIC) #include <cutils/properties.h> #endif // !defined(OS_GENERIC) #include "bt_utils.h" #include "bta_api.h" #include "bta_sys.h" Loading Loading @@ -372,7 +379,12 @@ void bta_hf_client_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id, *******************************************************************************/ static void bta_hf_client_api_enable(tBTA_HF_CLIENT_DATA *p_data) { // TODO(armansito): For non-Android systems we need a common method of // loading system properties. Remove the conditionally compiled code once we // have that in place. #if !defined(OS_GENERIC) char value[PROPERTY_VALUE_MAX]; #endif // !defined(OS_GENERIC) /* initialize control block */ memset(&bta_hf_client_cb, 0, sizeof(tBTA_HF_CLIENT_CB)); Loading @@ -380,12 +392,17 @@ static void bta_hf_client_api_enable(tBTA_HF_CLIENT_DATA *p_data) /* store callback function */ bta_hf_client_cb.p_cback = p_data->api_enable.p_cback; // TODO(armansito): For non-Android systems we need a common method of // loading system properties. Remove the conditionally compiled code once we // have that in place. #if !defined(OS_GENERIC) /* check if mSBC support enabled */ property_get("ro.bluetooth.hfp.ver", value, "0"); if (strcmp(value,"1.6") == 0) { bta_hf_client_cb.msbc_enabled = TRUE; } #endif // !defined(OS_GENERIC) bta_hf_client_cb.scb.negotiated_codec = BTM_SCO_CODEC_CVSD; Loading system/bta/sys/bta_sys_main.c +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #define LOG_TAG "bt_bta_sys_main" #include <assert.h> #include <pthread.h> #include <string.h> #include "osi/include/alarm.h" Loading Loading
system/bta/BUILD.gn +6 −1 Original line number Diff line number Diff line Loading @@ -112,11 +112,16 @@ static_library("bta") { "//vnd/include", ] # TODO(armansito): Remove all of the flags below, since we want to enable all # warnings. cflags = [ "-Wno-unused-variable", "-Wno-unused-value", "-Wno-unused-function", "-Wno-pointer-to-int-cast", "-Wno-int-to-pointer-cast", ] cflags_c = [ "-Wno-pointer-to-int-cast", ] }
system/bta/hf_client/bta_hf_client_main.c +17 −0 Original line number Diff line number Diff line Loading @@ -19,7 +19,14 @@ #include <string.h> #include <stdlib.h> // TODO(armansito): cutils/properties.h is only being used to pull-in runtime // settings on Android. Remove this conditional include once we have a generic // way to obtain system properties. #if !defined(OS_GENERIC) #include <cutils/properties.h> #endif // !defined(OS_GENERIC) #include "bt_utils.h" #include "bta_api.h" #include "bta_sys.h" Loading Loading @@ -372,7 +379,12 @@ void bta_hf_client_collision_cback (tBTA_SYS_CONN_STATUS status, UINT8 id, *******************************************************************************/ static void bta_hf_client_api_enable(tBTA_HF_CLIENT_DATA *p_data) { // TODO(armansito): For non-Android systems we need a common method of // loading system properties. Remove the conditionally compiled code once we // have that in place. #if !defined(OS_GENERIC) char value[PROPERTY_VALUE_MAX]; #endif // !defined(OS_GENERIC) /* initialize control block */ memset(&bta_hf_client_cb, 0, sizeof(tBTA_HF_CLIENT_CB)); Loading @@ -380,12 +392,17 @@ static void bta_hf_client_api_enable(tBTA_HF_CLIENT_DATA *p_data) /* store callback function */ bta_hf_client_cb.p_cback = p_data->api_enable.p_cback; // TODO(armansito): For non-Android systems we need a common method of // loading system properties. Remove the conditionally compiled code once we // have that in place. #if !defined(OS_GENERIC) /* check if mSBC support enabled */ property_get("ro.bluetooth.hfp.ver", value, "0"); if (strcmp(value,"1.6") == 0) { bta_hf_client_cb.msbc_enabled = TRUE; } #endif // !defined(OS_GENERIC) bta_hf_client_cb.scb.negotiated_codec = BTM_SCO_CODEC_CVSD; Loading
system/bta/sys/bta_sys_main.c +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #define LOG_TAG "bt_bta_sys_main" #include <assert.h> #include <pthread.h> #include <string.h> #include "osi/include/alarm.h" Loading