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

Commit cc07fa73 authored by Dan Zhang's avatar Dan Zhang Committed by android-build-merger
Browse files

Merge "Fix NPE by pressing Volume Up/Down" am: fca5ee0b

am: bd57a4d8

Change-Id: I23595e55b5c38cecb39272f7c739c27abe1eddb3
parents 3a05ecd7 bd57a4d8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1018,6 +1018,10 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    @ServiceThreadOnly
    void changeVolume(int curVolume, int delta, int maxVolume) {
        assertRunOnServiceThread();
        if (getAvrDeviceInfo() == null) {
            // On initialization process, getAvrDeviceInfo() may return null and cause exception
            return;
        }
        if (delta == 0 || !isSystemAudioActivated()) {
            return;
        }
@@ -1047,6 +1051,10 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    @ServiceThreadOnly
    void changeMute(boolean mute) {
        assertRunOnServiceThread();
        if (getAvrDeviceInfo() == null) {
            // On initialization process, getAvrDeviceInfo() may return null and cause exception
            return;
        }
        HdmiLogger.debug("[A]:Change mute:%b", mute);
        synchronized (mLock) {
            if (mSystemAudioMute == mute) {