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

Commit 11f8ad03 authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge changes Ia89d5976,Ifbc7bc4e,I61100b3f,Ic4ae9c8f,I704b13ad, ...

* changes:
  shim::LeScanningManager: Use shim storage
  Remove AdapterConfig
  Storage: Remove save and flush
  StorageModuleTest: Enable tests
  Storage: Abort if the callback is invalidated
  Storage: Encapsulate ConfigCache
  Storage: Only save when storage has changed
parents 08071b30 ff263c53
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -366,7 +366,6 @@ bool bta_ag_sdp_find_attr(tBTA_AG_SCB* p_scb, tBTA_SERVICE_MASK service) {
        if (btif_config_set_bin(
                p_scb->peer_addr.ToString(), HFP_VERSION_CONFIG_KEY,
                (const uint8_t*)&peer_version, sizeof(peer_version))) {
          btif_config_save();
        } else {
          APPL_TRACE_WARNING("%s: Failed to store peer HFP version for %s",
                             __func__,
@@ -395,7 +394,6 @@ bool bta_ag_sdp_find_attr(tBTA_AG_SCB* p_scb, tBTA_SERVICE_MASK service) {
          if (btif_config_set_bin(
                  p_scb->peer_addr.ToString(), HFP_SDP_FEATURES_CONFIG_KEY,
                  (const uint8_t*)&sdp_features, sizeof(sdp_features))) {
            btif_config_save();
          } else {
            APPL_TRACE_WARNING(
                "%s: Failed to store peer HFP SDP Features for %s", __func__,
+0 −1
Original line number Diff line number Diff line
@@ -543,7 +543,6 @@ static void bta_av_a2dp_sdp_cback(bool found, tA2DP_Service* p_service,
                              AVDTP_VERSION_CONFIG_KEY,
                              (const uint8_t*)&p_service->avdt_version,
                              sizeof(p_service->avdt_version))) {
        btif_config_save();
      } else {
        APPL_TRACE_WARNING("%s: Failed to store peer AVDTP version for %s",
                           __func__,
+0 −2
Original line number Diff line number Diff line
@@ -1112,7 +1112,6 @@ static void store_avrcp_profile_feature(tSDP_DISC_REC* sdp_rec) {
                          (const uint8_t*)&avrcp_features,
                          sizeof(avrcp_features))) {
    LOG_INFO("Saving avrcp_features: 0x%x", avrcp_features);
    btif_config_save();
  } else {
    LOG_INFO("Failed to store avrcp_features 0x%x for %s", avrcp_features,
             ADDRESS_TO_LOGGABLE_CSTR(sdp_rec->remote_bd_addr));
@@ -1153,7 +1152,6 @@ static void bta_dm_store_audio_profiles_version() {
                              audio_profile.profile_key,
                              (const uint8_t*)&profile_version,
                              sizeof(profile_version))) {
        btif_config_save();
      } else {
        LOG_INFO("Failed to store peer profile version for %s",
                 ADDRESS_TO_LOGGABLE_CSTR(sdp_rec->remote_bd_addr));
+0 −2
Original line number Diff line number Diff line
@@ -69,7 +69,5 @@ size_t btif_config_get_bin_length(const std::string& section,

std::vector<RawAddress> btif_config_get_paired_devices();

void btif_config_save(void);
void btif_config_flush(void);
bool btif_config_clear(void);
void btif_debug_config_dump(int fd);
+0 −12
Original line number Diff line number Diff line
@@ -192,7 +192,6 @@ static future_t* init(void) {
}

static future_t* shut_down(void) {
  btif_config_flush();
  return future_new_immediate(FUTURE_SUCCESS);
}

@@ -313,20 +312,9 @@ bool btif_config_remove(const std::string& section, const std::string& key) {
  return bluetooth::shim::BtifConfigInterface::RemoveProperty(section, key);
}

void btif_config_save(void) {
  CHECK(bluetooth::shim::is_gd_stack_started_up());
  bluetooth::shim::BtifConfigInterface::Save();
}

void btif_config_flush(void) {
  CHECK(bluetooth::shim::is_gd_stack_started_up());
  bluetooth::shim::BtifConfigInterface::Flush();
}

bool btif_config_clear(void) {
  CHECK(bluetooth::shim::is_gd_stack_started_up());
  bluetooth::shim::BtifConfigInterface::Clear();
  bluetooth::shim::BtifConfigInterface::Save();
  return true;
}

Loading