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

Commit 3ddfee97 authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

Wait for pairing before requesting HID connection

Test: Pair with a HID device
Test: mmm packages/modules/Bluetooth
Bug: 282824761
Bug: 314707251

Change-Id: Ic01535c71fb92ed8c4337714abc181a2c7152ea8
parent e129979f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@
#include <mutex>
#include <optional>

#include <android_bluetooth_flags.h>
#include "advertise_data_parser.h"
#include "bta/dm/bta_dm_disc.h"
#include "bta/include/bta_api.h"
@@ -832,7 +833,8 @@ static void btif_dm_cb_create_bond(const RawAddress bd_addr,
                       static_cast<tBT_DEVICE_TYPE>(device_type));
  }

  if (is_hid && (device_type & BT_DEVICE_TYPE_BLE) == 0) {
  if (!IS_FLAG_ENABLED(connect_hid_after_service_discovery) &&
      is_hid && (device_type & BT_DEVICE_TYPE_BLE) == 0) {
    const bt_status_t status =
        GetInterfaceToProfiles()->profileSpecific_HACK->btif_hh_connect(
            &bd_addr);