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

Commit 6bb0933e authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

Save HID host connection policy on initial successful connection

Test: mmm packages/modules/Bluetooth
Test: Manual | Pair a HID/HOGP device, restart BT, initiate connection
from the HID/HOGP device
Flag: com.android.bluetooth.flags.save_initial_hid_connection_policy
Bug: 335583844
Bug: 335904609

Change-Id: Ia0d8dffd8c0e397b1ea93da1037686817fe016ba
parent b25ffe89
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1208,6 +1208,12 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) {
            p_data->dscp_info.ssr_max_latency, p_data->dscp_info.ssr_min_tout,
            len, p_data->dscp_info.descriptor.dsc_list);

        // Allow incoming connections
        if (IS_FLAG_ENABLED(allow_switching_hid_and_hogp) &&
            IS_FLAG_ENABLED(save_initial_hid_connection_policy)) {
          btif_storage_set_hid_connection_policy(p_dev->link_spec, true);
        }

        ASSERTC(ret == BT_STATUS_SUCCESS, "storing hid info failed", ret);
        log::warn("BTA_HH_GET_DSCP_EVT: Called add device");