diff options
author | Jinsuk Kim <jinsukkim@google.com> | 2015-03-18 10:52:13 +0900 |
---|---|---|
committer | Jinsuk Kim <jinsukkim@google.com> | 2015-03-20 10:02:34 +0900 |
commit | 8d115eb18fce5b85538239e2373c3efd28e46986 (patch) | |
tree | c54d0ce8bf5771e43322de30314ae9d883a53214 /services/core/java/com/android/server/hdmi | |
parent | c81292964ac4224c7de019a22a41dabafa0e6b59 (diff) | |
download | frameworks_base-8d115eb18fce5b85538239e2373c3efd28e46986.zip frameworks_base-8d115eb18fce5b85538239e2373c3efd28e46986.tar.gz frameworks_base-8d115eb18fce5b85538239e2373c3efd28e46986.tar.bz2 |
CEC: Expose API sendStandby()
Allows playback/TV device to use the API to turn off
TV/other device that accepts the command.
Bug: 19802768
Change-Id: I6440626c08efb1473bea5ab577e571d0bb92d4a1
Diffstat (limited to 'services/core/java/com/android/server/hdmi')
-rw-r--r-- | services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java index 1e43670..70fa441 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java @@ -254,6 +254,16 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { @Override @ServiceThreadOnly + protected void sendStandby(int deviceId) { + assertRunOnServiceThread(); + + // Playback device can send <Standby> to TV only. Ignore the parameter. + int targetAddress = Constants.ADDR_TV; + mService.sendCecCommand(HdmiCecMessageBuilder.buildStandby(mAddress, targetAddress)); + } + + @Override + @ServiceThreadOnly protected void disableDevice(boolean initiatedByCec, PendingActionClearedCallback callback) { super.disableDevice(initiatedByCec, callback); |