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

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

Fix NPE when Audio System is not registered.

ag/5582763

Test: manual
Bug: 119840618
Change-Id: I8197a919651e1623e3d2b218ec1f32748f1122d2
parent f7782b38
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1965,6 +1965,10 @@ public class HdmiControlService extends SystemService {
                        Slog.e(TAG, "Not an audio system device. Won't set system audio mode on");
                        return;
                    }
                    if (audioSystem() == null) {
                        Slog.e(TAG, "Audio System local device is not registered");
                        return;
                    }
                    if (!audioSystem().checkSupportAndSetSystemAudioMode(true)) {
                        Slog.e(TAG, "System Audio Mode is not supported.");
                        return;