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

Commit 9689378f authored by Eric Shih's avatar Eric Shih
Browse files

Make rfcomm sniff timeout configurable

Bug: 312631766
Test: m Bluetooth
Flag: EXEMPT, behavior not changed.
Change-Id: I9bed89c970fcb34aa3d97e8ad9acca8c20de16c6
parent eef273d0
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -129,6 +129,13 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_CFG
tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC* get_bta_dm_pm_spec() {
  static uint16_t hs_sniff_delay = uint16_t(
      osi_property_get_int32("bluetooth.bta_hs_sniff_delay_ms.config", 7000));
  static uint16_t fts_ops_idle_to_sniff_delay_ms =
      uint16_t(osi_property_get_int32(
          "bluetooth.bta_fts_ops_idle_to_sniff_delay_ms.config",
          BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS));
  static uint16_t ftc_idle_to_sniff_delay_ms = uint16_t(
      osi_property_get_int32("bluetooth.bta_ftc_idle_to_sniff_delay_ms.config",
                             BTA_FTC_IDLE_TO_SNIFF_DELAY_MS));

  static tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC
      bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = {
@@ -308,7 +315,7 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC* get_bta_dm_pm_spec() {
                {BTA_DM_PM_NO_ACTION, 0}}, /* sco open  */
               {{BTA_DM_PM_NO_ACTION, 0},
                {BTA_DM_PM_NO_ACTION, 0}}, /* sco close   */
               {{BTA_DM_PM_SNIFF_A2DP_IDX, BTA_FTC_IDLE_TO_SNIFF_DELAY_MS},
               {{BTA_DM_PM_SNIFF_A2DP_IDX, ftc_idle_to_sniff_delay_ms},
                {BTA_DM_PM_NO_ACTION, 0}},                        /* idle */
               {{BTA_DM_PM_ACTIVE, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* busy */
               {{BTA_DM_PM_NO_ACTION, 0},
@@ -330,7 +337,7 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC* get_bta_dm_pm_spec() {
                {BTA_DM_PM_NO_ACTION, 0}}, /* sco open  */
               {{BTA_DM_PM_NO_ACTION, 0},
                {BTA_DM_PM_NO_ACTION, 0}}, /* sco close   */
               {{BTA_DM_PM_SNIFF_A2DP_IDX, BTA_FTS_OPS_IDLE_TO_SNIFF_DELAY_MS},
               {{BTA_DM_PM_SNIFF_A2DP_IDX, fts_ops_idle_to_sniff_delay_ms},
                {BTA_DM_PM_NO_ACTION, 0}},                        /* idle */
               {{BTA_DM_PM_ACTIVE, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* busy */
               {{BTA_DM_PM_NO_ACTION, 0},