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

Commit 6ddb61d6 authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Gerrit Code Review
Browse files

Merge "Remove the input device record on virtual unplug" into main

parents a70fadab 3428514d
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);
    }