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

Commit 299d0fb4 authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

We always want to switch role to central am: 87468350 am: ed3715da am:...

We always want to switch role to central am: 87468350 am: ed3715da am: c200f13a am: 0a7ea654

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1487958

Change-Id: Ifdf79b3c973e2f43230e4a744745bb8aaa8a92b9
parents 47884cf6 0a7ea654
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -576,7 +576,7 @@ void btm_acl_encrypt_change(uint16_t handle, uint8_t status,
      p->set_switch_role_switching();
    }

    btsnd_hcic_switch_role(p->remote_addr, (uint8_t)!p->link_role);
    btsnd_hcic_switch_role(p->remote_addr, HCI_ROLE_CENTRAL);
    p->rs_disc_pending = BTM_SEC_RS_PENDING;
  }
  /* Finished enabling Encryption after role switch */
@@ -2101,7 +2101,7 @@ void btm_cont_rswitch_from_handle(uint16_t hci_handle) {
      if (p->is_switch_role_mode_change()) {
        p->set_switch_role_in_progress();
        p->rs_disc_pending = BTM_SEC_RS_PENDING;
        btsnd_hcic_switch_role(p->remote_addr, (uint8_t)!p->link_role);
        btsnd_hcic_switch_role(p->remote_addr, HCI_ROLE_CENTRAL);
      }
    }
  }