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

Commit 8ba147c2 authored by Amy's avatar Amy Committed by shubang
Browse files

Fix NPE in HdmiControlService

ag/5542011

This is an NPE happens when Audio System device is not registered and
users/clients try to enable System Audio Mode support.

Test: manual
Change-Id: Id0d1d4bad635da6cf015f56cad46ec603657fd1b
parent cdd25e94
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -614,6 +614,11 @@ public class HdmiControlService extends SystemService {
                        tv().setSystemAudioControlFeatureEnabled(enabled);
                    }
                    if (isAudioSystemDevice()) {
                        if (audioSystem() == null) {
                            Slog.e(TAG, "Audio System device has not registered yet."
                                    + " Can't turn system audio mode on.");
                            break;
                        }
                        audioSystem().onSystemAduioControlFeatureSupportChanged(enabled);
                    }
                    break;