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

Commit db88f358 authored by Archie Pusaka's avatar Archie Pusaka Committed by Gerrit Code Review
Browse files

Merge "hh: Don't send SET IDLE" into main

parents e02d711e 4c16fc6d
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -640,11 +640,15 @@ static void hh_open_handler(tBTA_HH_CONN& conn) {
    p_dev->dev_status = BTHH_CONN_STATE_CONNECTED;
    p_dev->dev_status = BTHH_CONN_STATE_CONNECTED;
  }
  }
  hh_connect_complete(conn, BTHH_CONN_STATE_CONNECTED);
  hh_connect_complete(conn, BTHH_CONN_STATE_CONNECTED);

  if (!com::android::bluetooth::flags::dont_send_hid_set_idle()) {
    // Send set_idle if the peer_device is a keyboard
    // Send set_idle if the peer_device is a keyboard
    // TODO (b/307923455): clean this, set idle is deprecated in HID spec v1.1.1
    if (check_cod_hid_major(conn.link_spec.addrt.bda, COD_HID_KEYBOARD) ||
    if (check_cod_hid_major(conn.link_spec.addrt.bda, COD_HID_KEYBOARD) ||
        check_cod_hid_major(conn.link_spec.addrt.bda, COD_HID_COMBO)) {
        check_cod_hid_major(conn.link_spec.addrt.bda, COD_HID_COMBO)) {
      BTA_HhSetIdle(conn.handle, 0);
      BTA_HhSetIdle(conn.handle, 0);
    }
    }
  }
  BTA_HhGetDscpInfo(conn.handle);
  BTA_HhGetDscpInfo(conn.handle);
}
}