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

Commit e0208308 authored by Paul Colta's avatar Paul Colta
Browse files

HDMI: Avoid possible NPE in HdmiControlService

Check if local device TV exists before using it

Test: atest com.android.server.hdmi
Bug: 330615500
Change-Id: I48da9c89943402123d9d7bca2ac4c97f30c2dfee
parent 18d9609d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1649,7 +1649,7 @@ public class HdmiControlService extends SystemService {
                // allocation. This action is used by the TV to get the active source from the CEC
                // network. If the TV sent a source changing CEC message, this action does not have
                // to continue anymore.
                if (isTvDevice()) {
                if (isTvDeviceEnabled()) {
                    tv().removeAction(RequestActiveSourceAction.class);
                }
                sendCecCommandWithRetries(command, callback);