Fix HID virtual unplug handling
Virtual unplug event must be generated on device removal. Virtual unplug can be called for device not in connected state. Virtual unplug can happen for HOGP devices as well. The HID virtual unplug event informs HidHostService and apps that the HID device has been removed. 1. App requests HID VUP 1.1 HID host sends VUP command to the HID device if connected and supported 1.2 HID host disconnects if connected 1.3 HID host removes the bond and HID info 1.4 HID host generates HID VUP event 2. App removes bond 2.1 Stack requests HID host to perform HID VUP 2.2 HID host sends VUP command to the HID device if connected and supported 2.3 HID host disconnects if connected 2.4 HID host removes the bond and HID info 2.5 HID host generates HID VUP event 3. HID device sends HID VUP 3.1 HID host disconnects if connected 3.2 HID host removes the bond if required 3.3 HID host generates HID VUP event 4. Stack removes the bond autonomously (Stack has to ensure that related ACLs are disconnected before this) 4.1 Stack requests HID host to remove HID information 4.2 HID host removes HID info 4.3 HID host generates HID VUP event Test: mmm packages/modules/Bluetooth Test: Manual | Pair with HID/HOGP device, remove the HID/HOGP device, pair with the HID/HOGP device again Test: Manual | Pair with HID/HOGP device, trigger bond loss on the HID/HOGP device, reconnect with the HID/HOGP device Flag: com.android.bluetooth.flags.remove_input_device_on_vup Bug: 347241319 Bug: 354758065 Change-Id: I3f5d82b0609d4204fa382786979001f22c5f24d1
Loading
Please register or sign in to comment