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

Commit 8ecb0018 authored by Amy's avatar Amy Committed by Amy Zhang
Browse files

Invalidate Active Source record when source device goes to Standby

Test: manual
Bug: 131629012
Change-Id: I559b503099cf26ffdff59bca57982616033d0f8e
(cherry picked from commit a625df3f3d2fd667d89e1b71c04ca5b172b42158)
parent 49d0108e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -329,6 +329,9 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
    @ServiceThreadOnly
    protected void onStandby(boolean initiatedByCec, int standbyAction) {
        assertRunOnServiceThread();
        // Invalidate the internal active source record when goes to standby
        // This set will also update mIsActiveSource
        mService.setActiveSource(Constants.ADDR_INVALID, Constants.INVALID_PHYSICAL_ADDRESS);
        mTvSystemAudioModeSupport = null;
        // Record the last state of System Audio Control before going to standby
        synchronized (mLock) {
+3 −0
Original line number Diff line number Diff line
@@ -159,6 +159,9 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource {
    @ServiceThreadOnly
    protected void onStandby(boolean initiatedByCec, int standbyAction) {
        assertRunOnServiceThread();
        // Invalidate the internal active source record when goes to standby
        // This set will also update mIsActiveSource
        mService.setActiveSource(Constants.ADDR_INVALID, Constants.INVALID_PHYSICAL_ADDRESS);
        if (!mService.isControlEnabled() || initiatedByCec || !mAutoTvOff) {
            return;
        }