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

Commit ed3715da 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

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

Change-Id: Ia4ca15d7dd86fd4b0deb7c54800deb652c9401e1
parents 8708d908 87468350
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);
      }
    }
  }