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

Commit 52c3662d authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Automerger Merge Worker
Browse files

Merge "Remove the input device record on virtual unplug" into main am: 6ddb61d6

parents 826dca20 6ddb61d6
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -519,10 +519,16 @@ public class HidHostService extends ProfileService {

    private void handleMessageOnVirtualUnplug(Message msg) {
        BluetoothDevice device = mAdapterService.getDeviceFromByte((byte[]) msg.obj);
        if (Flags.removeInputDeviceOnVup()) {
            updateConnectionState(
                    device, getTransport(device), BluetoothProfile.STATE_DISCONNECTED);
            mInputDevices.remove(device);
        } else {
            int transport = msg.arg1;
            if (!checkTransport(device, transport, msg.what)) {
                return;
            }
        }
        int status = msg.arg2;
        broadcastVirtualUnplugStatus(device, status);
    }