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

Commit c5093cfb authored by daren.liao's avatar daren.liao Committed by Daren Liao
Browse files

Fix SystemAudioAutoInitiationAction not started

[Description]
revert part of solution in
55bc36d3

On Android R, TV's power status is TRANSIENT_TO_STANDBY
by default, in this case, device information related actions
should be started as well, that's why we allow
SystemAudioAutoInitiationAction and NewDeviceAction to be started

When TV boot up, SystemAudioAutoInitiationAction
is not started if power statusof HdmiControlService is not ON

This happens if onNewAvrAdded is called before
SystemService.PHASE_BOOT_COMPLETED

Bug: 194429425

Test:
Build PASS
Boot with ARC device plugged PASS

Change-Id: I79cd1d4f5a180a052be49df186505e579f7d1339
parent 2adba7dd
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -619,11 +619,9 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
            }
        }

        if (!mService.isPowerStandbyOrTransient()) {
        addAndStartAction(new NewDeviceAction(this, activeSource.logicalAddress,
                activeSource.physicalAddress, deviceType));
    }
    }

    private boolean handleNewDeviceAtTheTailOfActivePath(int path) {
        // Seq #22
@@ -798,7 +796,6 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    @ServiceThreadOnly
    void onNewAvrAdded(HdmiDeviceInfo avr) {
        assertRunOnServiceThread();
        if (!mService.isPowerStandbyOrTransient()) {
        addAndStartAction(new SystemAudioAutoInitiationAction(this, avr.getLogicalAddress()));
        if (!isDirectConnectAddress(avr.getPhysicalAddress())) {
            startArcAction(false);
@@ -807,7 +804,6 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
            startArcAction(true);
        }
    }
    }

    // Clear all device info.
    @ServiceThreadOnly