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

Commit 58ebd048 authored by Myles Watson's avatar Myles Watson
Browse files

InitFlags: Remove asha_phy_update_retry_limit

Bug: 280693404
Fixes: 290842871
Test: mma -j32
Flag: EXEMPT, no logical change
Change-Id: I8ac3e19666e87fd3aaaff4e7bcfc57d55da4a726
parent 533c740d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -744,7 +744,7 @@ class HearingAidImpl : public HearingAid {
    if (tx_phys == PHY_LE_2M && rx_phys == PHY_LE_2M) {
      log::info("phy update to 2M successful: bd_addr={}",
                hearingDevice->address);
      hearingDevice->phy_update_retry_remain = PHY_UPDATE_RETRY_LIMIT;
      hearingDevice->phy_update_retry_remain = kPhyUpdateRetryLimit;
      return;
    }

+7 −10
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@
#include <functional>
#include <vector>

#include "common/init_flags.h"
#include "stack/include/gap_api.h"
#include "types/raw_address.h"

@@ -41,8 +40,7 @@ constexpr uint8_t CAPABILITY_CSIS = 0x04;
constexpr uint8_t CAPABILITY_RESERVED = 0xF8;

// Number of retry for phy update. This targets to reduce phy update collision.
const static uint8_t PHY_UPDATE_RETRY_LIMIT =
    bluetooth::common::init_flags::get_asha_phy_update_retry_limit();
const static uint8_t kPhyUpdateRetryLimit = 5;

/** Implementations of HearingAid will also implement this interface */
class HearingAidAudioReceiver {
@@ -169,11 +167,10 @@ struct HearingDevice {

  int phy_update_retry_remain;

  HearingDevice(const RawAddress& address, uint8_t capabilities,
                uint16_t codecs, uint16_t audio_control_point_handle,
                uint16_t audio_status_handle, uint16_t audio_status_ccc_handle,
                uint16_t service_changed_ccc_handle, uint16_t volume_handle,
                uint16_t read_psm_handle, uint64_t hiSyncId,
  HearingDevice(const RawAddress& address, uint8_t capabilities, uint16_t codecs,
                uint16_t audio_control_point_handle, uint16_t audio_status_handle,
                uint16_t audio_status_ccc_handle, uint16_t service_changed_ccc_handle,
                uint16_t volume_handle, uint16_t read_psm_handle, uint64_t hiSyncId,
                uint16_t render_delay, uint16_t preparation_delay)
      : address(address),
        first_connection(false),
@@ -199,7 +196,7 @@ struct HearingDevice {
        command_acked(false),
        read_rssi_count(0),
        gap_opened(false),
        phy_update_retry_remain(PHY_UPDATE_RETRY_LIMIT) {}
        phy_update_retry_remain(kPhyUpdateRetryLimit) {}

  HearingDevice(const RawAddress& address, bool first_connection)
      : address(address),
@@ -224,7 +221,7 @@ struct HearingDevice {
        command_acked(false),
        read_rssi_count(0),
        gap_opened(false),
        phy_update_retry_remain(PHY_UPDATE_RETRY_LIMIT) {}
        phy_update_retry_remain(kPhyUpdateRetryLimit) {}

  HearingDevice() : HearingDevice(RawAddress::kEmpty, false) {}

+0 −1
Original line number Diff line number Diff line
@@ -207,7 +207,6 @@ pub fn set_all_for_testing() {
init_flags!(
    name: InitFlags
    flags: {
        asha_phy_update_retry_limit: i32 = 5,
        always_send_services_if_gatt_disc_done = true,
        always_use_private_gatt_for_debugging,
        bluetooth_power_telemetry = false,
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ mod ffi {
        fn dynamic_avrcp_version_enhancement_is_enabled() -> bool;
        fn gatt_robust_caching_server_is_enabled() -> bool;
        fn get_hci_adapter() -> i32;
        fn get_asha_phy_update_retry_limit() -> i32;
        fn hfp_dynamic_version_is_enabled() -> bool;
        fn irk_rotation_is_enabled() -> bool;
        fn leaudio_targeted_announcement_reconnection_mode_is_enabled() -> bool;