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

Commit ba155e01 authored by Hemant Gupta's avatar Hemant Gupta Committed by Zhihai Xu
Browse files

HID: Send Close event to upper layers during reconnection

This patch sends close event callback to upper layers, so that UI
is updated of correct state of HID connection when connection
between hid host and hid device drops for some reason and host is
attempting reconnection. Without this patch, upper layers gives
false update of connection still present when actually no connection
exists between hid devices. Connection state was only getting updated
if reconnection attempt was also failing.

Change-Id: Ic276d9b57c5c84c4264ddeeadc34c983c718ba3a
parent 721d8e00
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -662,6 +662,7 @@ static void hidh_l2cif_disconnect_ind (UINT16 l2cap_cid, BOOLEAN ack_needed)
            hh_cb.devices[dhandle].conn_tries = 0;
            hh_cb.devices[dhandle].conn.timer_entry.param = (UINT32) dhandle;
            btu_start_timer (&(hh_cb.devices[dhandle].conn.timer_entry), BTU_TTYPE_HID_HOST_REPAGE_TO, HID_HOST_REPAGE_WIN);
            hh_cb.callback( dhandle,  hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, disc_res, NULL);
        }
        else
#endif