Merge "Implement powerOnRemoteDevice method" am: b2a61f7c31 am: df5e8a909c am: 95e7e55319 am: 32b5a2caae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1396413 Change-Id: I12a903aae9400e79acdf3dabfbda39197ee4d44d
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user