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

Commit 94183ea0 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 am: 52c3662d

parents ed43e44c 52c3662d
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);
    }