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

Commit 7f69d67f authored by Amy's avatar Amy Committed by shubang
Browse files

Fix NPE in HdmiControlService when set routing control on Unregistered

device.

ag/5486789

Test: manual
Bug: 119281901
Change-Id: Iff652cd478be51135de9177dabf0d827c0e0947f
parent ec1dec74
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -619,6 +619,11 @@ public class HdmiControlService extends SystemService {
                    break;
                case Global.HDMI_CEC_SWITCH_ENABLED:
                    if (isAudioSystemDevice()) {
                        if (audioSystem() == null) {
                            Slog.w(TAG, "Switch device has not registered yet."
                                    + " Can't turn routing on.");
                            break;
                        }
                        audioSystem().setRoutingControlFeatureEnables(enabled);
                    }
                    break;