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

Commit 83262045 authored by Dorin Drimus's avatar Dorin Drimus
Browse files

Add cancel discovery before BLE get remote services.

[Description]
After BLE authentication complete, the TV couldn't get remote
services when in inquiry state. Because state machine in searching
state, the TV couldn't to discover services. So cancel discovery
before get remote services.

[Test Report]
Step 1: TV scan BT devices, RC in pairing state.
Step 2: RC name show in TV setting UI, after RC exit pairing state,
click pair key to pairing the RC.
Step 3: Click back button to exit Bluetooth scan UI, then re-enter
the Bluetooth scan UI, RC re-enter pairing state.
Test pass.

Change-Id: I15fbc00e824f97583a550627a4f90deac9de3e25
Test: manual with above steps
Bug: 202923715
parent 4e208206
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2688,6 +2688,8 @@ static void btif_dm_ble_auth_cmpl_evt(tBTA_DM_AUTH_CMPL* p_auth_cmpl) {
      state = BT_BOND_STATE_NONE;
    } else {
      btif_dm_save_ble_bonding_keys(bdaddr);
      // Ensure inquiry is stopped before attempting service discovery
      btif_dm_cancel_discovery();
      btif_dm_get_remote_services(bd_addr, BT_TRANSPORT_LE);
    }
  } else {