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

Commit 9ccff51b authored by Donghyun Cho's avatar Donghyun Cho
Browse files

Don't broadcast <Standby> message during shutdown when setting is disabled

When the system is shutting down or the screen is going to be off, <Standby>
message will be broadcasted if and only if the setting variable,
Settings.Global#HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED, is enabled. This change
will make the shutdown case to be checked with the setting properly, too.

Bug: 27781559
Change-Id: Ia6605d6b5627ab1ff67285d72846b618a09548bc
parent 5ee693f4
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -165,15 +165,13 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice {
    @ServiceThreadOnly
    protected void onStandby(boolean initiatedByCec, int standbyAction) {
        assertRunOnServiceThread();
        if (!mService.isControlEnabled() || initiatedByCec) {
        if (!mService.isControlEnabled() || initiatedByCec || !mAutoTvOff) {
            return;
        }
        switch (standbyAction) {
            case HdmiControlService.STANDBY_SCREEN_OFF:
                if (mAutoTvOff) {
                mService.sendCecCommand(
                        HdmiCecMessageBuilder.buildStandby(mAddress, Constants.ADDR_TV));
                }
                break;
            case HdmiControlService.STANDBY_SHUTDOWN:
                // ACTION_SHUTDOWN is taken as a signal to power off all the devices.