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

Skip to content
Commit 78f64841 authored by Archie Pusaka's avatar Archie Pusaka Committed by Archie Pusaka
Browse files

Set is_local_initialized before calling BTA_DmBond() in btif

If a peer doesn't support secure connections, BT makes a shortcut to
prefetch the pin. If the connection is initialized by the user, the
pin will default to 0000, which works almost all the time.

However, the variable that stores "is initialized by user" is set after
the shortcut, therefore it's possible to be asked for pin even though
the connection is user initialized.

Bug: 360065704
Test: m -j
Test: Verify with the steps given below with Apple magic mouse.
      (1) Spy for the Remote Name Req HCI event (e.g. using btmon).
      (2) Put mouse in pairing more and initiate pairing.
      (3) Immediately when event (1) is captured, power off the mouse.
      (4) Wait 5 seconds (until HCI connect request times out).
      (5) Power on mouse and pair again
      (6) Verify no pin code entry is asked, mouse is usable.
Flag: EXEMPT, trivial bugfix
Change-Id: I3327736209d7168c47665a852ccba7984186a9c0
parent 0ed8ea93
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment