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

Commit 000e876a authored by William Escande's avatar William Escande
Browse files

Flagging: use ifndef TARGET_FLOSS

The flagging code is natively supported on host. Instead of running the
code only on android, we should not run it only on floss

Bug: 309697497
Fix: 309697497
Test: m Bluetooth | build change does not impact device code
Change-Id: Id5580b275665eb3e125fd09b0c01861e6e329b8a
parent e976df30
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

#include <base/functional/bind.h>
#include <base/strings/string_number_conversions.h>
#ifdef __ANDROID__
#ifndef TARGET_FLOSS
#include <com_android_bluetooth_flags.h>
#endif
#include <lc3.h>
@@ -166,7 +166,7 @@ std::ostream& operator<<(std::ostream& os, const AudioState& audio_state) {
namespace {
void le_audio_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC* p_data);

#ifdef __ANDROID__
#ifndef TARGET_FLOSS
static void le_audio_health_status_callback(const RawAddress& addr,
                                            int group_id,
                                            LeAudioHealthBasedAction action);
@@ -254,7 +254,7 @@ class LeAudioClientImpl : public LeAudioClient {
      reconnection_mode_ = BTM_BLE_BKG_CONNECT_ALLOW_LIST;
    }

#ifdef __ANDROID__
#ifndef TARGET_FLOSS
    if (com::android::bluetooth::flags::leaudio_enable_health_based_actions()) {
      LOG_INFO("Loading health status module");
      leAudioHealthStatus_ = LeAudioHealthStatus::Get();
@@ -5477,8 +5477,9 @@ class LeAudioClientImpl : public LeAudioClient {
  }
};

#ifdef __ANDROID__
void le_audio_health_status_callback(const RawAddress& addr, int group_id,
#ifndef TARGET_FLOSS
static void le_audio_health_status_callback(const RawAddress& addr,
                                            int group_id,
                                            LeAudioHealthBasedAction action) {
  if (instance) {
    instance->LeAudioHealthSendRecommendation(addr, group_id, action);
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <base/functional/bind.h>
#include <base/functional/callback.h>
#include <base/strings/string_number_conversions.h>
#ifdef __ANDROID__
#ifndef TARGET_FLOSS
#include <com_android_bluetooth_flags.h>
#endif

@@ -307,7 +307,7 @@ class LeAudioGroupStateMachineImpl : public LeAudioGroupStateMachine {

  void notifyLeAudioHealth(LeAudioDeviceGroup* group,
                           le_audio::LeAudioHealthGroupStatType stat) {
#ifdef __ANDROID__
#ifndef TARGET_FLOSS
    if (!com::android::bluetooth::flags::
            leaudio_enable_health_based_actions()) {
      return;