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

Commit 3d28bf01 authored by Henri Chataing's avatar Henri Chataing
Browse files

sysprop: Remove the wrapper GET_SYSPROP

Originally added to let FLOSS have a different API.
Ia8b81aa0800cc02f82bed1666dd14ffbbbe82bbf removes
this workaround.

Bug: 331817295
Test: m com.android.btservices
Test: ./floss/build/build-in-container.py
Flag: EXEMPT, mechanical refactor
Change-Id: I8d6bdd7cac1da0a1bc76ca6ede4fcd98357cdb0e
parent e476ad48
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -22,6 +22,3 @@
#include <bta.sysprop.h>
#include <bta.sysprop.h>
#include <device_id.sysprop.h>
#include <device_id.sysprop.h>
#include <hfp.sysprop.h>
#include <hfp.sysprop.h>

#define GET_SYSPROP(namespace, prop, default) \
  android::sysprop::bluetooth::namespace ::prop().value_or(default)
+1 −1
Original line number Original line Diff line number Diff line
@@ -31,7 +31,7 @@ using namespace bluetooth;


bool is_hfp_aptx_voice_enabled() {
bool is_hfp_aptx_voice_enabled() {
  return com::android::bluetooth::flags::hfp_codec_aptx_voice() &&
  return com::android::bluetooth::flags::hfp_codec_aptx_voice() &&
         GET_SYSPROP(Hfp, codec_aptx_voice, false);
         android::sysprop::bluetooth::Hfp::codec_aptx_voice().value_or(false);
}
}


static bool aptx_swb_codec_status;
static bool aptx_swb_codec_status;
+2 −1
Original line number Original line Diff line number Diff line
@@ -348,7 +348,8 @@ void bta_dm_disable() {
  if (BTM_GetNumAclLinks() == 0) {
  if (BTM_GetNumAclLinks() == 0) {
    // Time to wait after receiving shutdown request to delay the actual
    // Time to wait after receiving shutdown request to delay the actual
    // shutdown process. This time may be zero which invokes immediate shutdown.
    // shutdown process. This time may be zero which invokes immediate shutdown.
    const uint64_t disable_delay_ms = GET_SYSPROP(Bta, disable_delay, 200);
    const uint64_t disable_delay_ms =
            android::sysprop::bluetooth::Bta::disable_delay().value_or(200);
    switch (disable_delay_ms) {
    switch (disable_delay_ms) {
      case 0:
      case 0:
        log::debug("Immediately disabling device manager");
        log::debug("Immediately disabling device manager");
+2 −1
Original line number Original line Diff line number Diff line
@@ -225,5 +225,6 @@ 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_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)
   BTA_HF_CLIENT_FEAT_ECS | BTA_HF_CLIENT_FEAT_ECC | BTA_HF_CLIENT_FEAT_CODEC)


  return GET_SYSPROP(Hfp, hf_client_features, DEFAULT_BTIF_HF_CLIENT_FEATURES);
  return android::sysprop::bluetooth::Hfp::hf_client_features().value_or(
          DEFAULT_BTIF_HF_CLIENT_FEATURES);
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -19,5 +19,5 @@
#include <android_bluetooth_sysprop.h>
#include <android_bluetooth_sysprop.h>


int get_default_hfp_version() {
int get_default_hfp_version() {
  return GET_SYSPROP(Hfp, version, HFP_VERSION_1_7);
  return android::sysprop::bluetooth::Hfp::version().value_or(HFP_VERSION_1_7);
}
}
Loading