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

Commit 3572b98f authored by Sherry Huang's avatar Sherry Huang
Browse files

HDMI: improve buffer active source logic

Previous update did not account for all possible branches and might lead
to index out of bound error.

Bug: b/423940203
Test: atest HdmiCecLocalDeviceTvTest
Flag: EXEMPT bugfix only
Change-Id: I9bc08d0a2018120ff39db33d7f2a8a22c1745c80
parent 3d65cd45
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -233,8 +233,10 @@ public class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
                    }
                }
            }), true);
        } else {
        } else if (!bufferedActiveSource.isEmpty()) {
            addCecDeviceForBufferedActiveSource(bufferedActiveSource.get(0));
        } else if (!bufferedActiveSourceFromService.isEmpty()) {
            addCecDeviceForBufferedActiveSource(bufferedActiveSourceFromService.get(0));
        }
    }