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

Commit 01f10fdf authored by Paul Colta's avatar Paul Colta Committed by Android (Google) Code Review
Browse files

Merge "HDMI: Fix possible IndexOutOfBoundsException in HdmiControlService" into main

parents 6f9393e1 a6f234e1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1688,7 +1688,11 @@ public class HdmiControlService extends SystemService {
    private void sendCecCommandWithRetries(HdmiCecMessage command,
            @Nullable SendMessageCallback callback) {
        assertRunOnServiceThread();
        HdmiCecLocalDevice localDevice = getAllCecLocalDevices().get(0);
        List<HdmiCecLocalDevice> devices = getAllCecLocalDevices();
        if (devices.isEmpty()) {
            return;
        }
        HdmiCecLocalDevice localDevice = devices.get(0);
        if (localDevice != null) {
            sendCecCommandWithoutRetries(command, new SendMessageCallback() {
                @Override