Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3355aa6 authored by Arman Uguray's avatar Arman Uguray Committed by Miao Chou
Browse files

gn-build: Get //bta:bta to compile

This CL gets the //bta:bta target to compile using GN + ninja.

BUG=21339022

Change-Id: I98e7ab732515b638f4f0c356a62f218ec223662a
parent f23edfa7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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",
  ]
}
+17 −0
Original line number Diff line number Diff line
@@ -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"
@@ -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));
@@ -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;

+1 −0
Original line number Diff line number Diff line
@@ -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"