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

Commit 471fb239 authored by David Duarte's avatar David Duarte
Browse files

Replace OS_ANDROID by __ANDROID__

__ANDROID__ is already set by the build environment
so we don't need to roll our own OS_ANDROID

Everything is replaced except system/btif/src/bluetooth.cc
as it's not present in internal branches and will be
removed in AOSP as well when b/280533897 will be fixed

Test: TreeHugger
Bug: 279502784
Change-Id: Ic2f72ae52f101819a12f0078cf1dc28c622efb1a
parent 77772eaf
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -600,9 +600,6 @@ cc_test {
            enabled: false,
        },
        android: {
            cflags: [
                "-DOS_ANDROID",
            ],
            sanitize: {
                misc_undefined: ["bounds"],
            },
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#include "bta/ag/bta_ag_int.h"
#include "bta/include/bta_dm_api.h"

#ifdef OS_ANDROID
#ifdef __ANDROID__
#include "bta/le_audio/devices.h"
#endif

+2 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
#include "bta/include/bta_ag_api.h"
#include "bta/include/utl.h"

#ifdef OS_ANDROID
#ifdef __ANDROID__
#include "bta/le_audio/devices.h"
#endif

@@ -1860,7 +1860,7 @@ void bta_ag_send_bcs(tBTA_AG_SCB* p_scb) {
 *
 ******************************************************************************/
bool bta_ag_is_sco_open_allowed(tBTA_AG_SCB* p_scb, const std::string event) {
#ifdef OS_ANDROID
#ifdef __ANDROID__
  /* Do not open SCO if 1. the dual mode audio system property is enabled,
  2. LEA is active, and 3. LEA is preferred for DUPLEX */
  if (bluetooth::os::GetSystemPropertyBool(
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
#define LOG_TAG "bt_bta_dm"

#include <base/logging.h>
#ifdef OS_ANDROID
#ifdef __ANDROID__
#include <bta.sysprop.h>
#endif

@@ -178,7 +178,7 @@ static void bta_dm_ctrl_features_rd_cmpl_cback(tHCI_STATUS result);
// Time to wait after receiving shutdown request to delay the actual shutdown
// process. This time may be zero which invokes immediate shutdown.
static uint64_t get_DisableDelayTimerInMs() {
#ifndef OS_ANDROID
#ifndef __ANDROID__
  return 200;
#else
  static const uint64_t kDisableDelayTimerInMs =
+2 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@

#include <cstdint>

#ifdef OS_ANDROID
#ifdef __ANDROID__
#include <hfp.sysprop.h>
#endif

@@ -225,7 +225,7 @@ int get_default_hf_client_features() {
   BTA_HF_CLIENT_FEAT_CLI | BTA_HF_CLIENT_FEAT_VREC | BTA_HF_CLIENT_FEAT_VOL | \
   BTA_HF_CLIENT_FEAT_ECS | BTA_HF_CLIENT_FEAT_ECC | BTA_HF_CLIENT_FEAT_CODEC)

#ifdef OS_ANDROID
#ifdef __ANDROID__
  static const int features =
      android::sysprop::bluetooth::Hfp::hf_client_features().value_or(
          DEFAULT_BTIF_HF_CLIENT_FEATURES);
Loading