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

Commit 32b5a2ca authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Implement powerOnRemoteDevice method" am: b2a61f7c am: df5e8a90 am: 95e7e553

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1396413

Change-Id: Icb2fba4cb47718a02f3720f4d351f297d8faf5dd
parents 4295a632 95e7e553
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -1965,7 +1965,21 @@ public class HdmiControlService extends SystemService {

        @Override
        public void powerOnRemoteDevice(int logicalAddress, int powerStatus) {
            // TODO(amyjojo): implement the method
            enforceAccessPermission();
            runOnServiceThread(new Runnable() {
                @Override
                public void run() {
                    Slog.i(TAG, "Device "
                            + logicalAddress + " power status is " + powerStatus
                            + " before power on command sent out");
                    if (getSwitchDevice() != null) {
                        getSwitchDevice().sendUserControlPressedAndReleased(
                                logicalAddress, HdmiCecKeycode.CEC_KEYCODE_POWER_ON_FUNCTION);
                    } else {
                        Slog.e(TAG, "Can't get the correct local device to handle routing.");
                    }
                }
            });
        }

        @Override