Merge "Implement powerOnRemoteDevice method"

This commit is contained in:
Treehugger Robot
2020-08-28 14:47:53 +00:00
committed by Gerrit Code Review

View File

@@ -1809,7 +1809,21 @@ public class HdmiControlService extends SystemService {
@Override @Override
public void powerOnRemoteDevice(int logicalAddress, int powerStatus) { 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 @Override