summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorNick Chalko <nchalko@google.com>2018-06-13 16:03:49 -0700
committerNick Chalko <nchalko@google.com>2018-07-18 11:50:16 -0700
commit6d9da80f4da95e00093313ff00cf08b1df418b61 (patch)
tree949f65e190ea14499d7498acfacbd48b8a9d0cea /core/java
parent67373192a92665a733bcd124f75e1f0db5e42f6a (diff)
Add stub method for detecting System Audio Mode support
Bug: 80297382 Test: m -j; stub only Change-Id: I74e03909e00f70806e05197d66a0eb30ea4e49c8
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/hardware/hdmi/HdmiAudioSystemClient.java30
1 files changed, 24 insertions, 6 deletions
diff --git a/core/java/android/hardware/hdmi/HdmiAudioSystemClient.java b/core/java/android/hardware/hdmi/HdmiAudioSystemClient.java
index 23eef4880344..3622650b304f 100644
--- a/core/java/android/hardware/hdmi/HdmiAudioSystemClient.java
+++ b/core/java/android/hardware/hdmi/HdmiAudioSystemClient.java
@@ -16,8 +16,8 @@
package android.hardware.hdmi;
/**
- * HdmiAudioSystemClient represents HDMI-CEC logical device of type Audio System
- * in the Android system which acts as an audio system device such as sound bar.
+ * HdmiAudioSystemClient represents HDMI-CEC logical device of type Audio System in the Android
+ * system which acts as an audio system device such as sound bar.
*
* <p>HdmiAudioSystemClient provides methods that control, get information from TV/Display device
* connected through HDMI bus.
@@ -27,16 +27,34 @@ package android.hardware.hdmi;
public final class HdmiAudioSystemClient extends HdmiClient {
private static final String TAG = "HdmiAudioSystemClient";
+ /** Reports if System Audio Mode is supported by the connected TV */
+ interface TvSystemAudioModeSupportedCallback {
+
+ /** {@code supported} is true if the TV is connected and supports System Audio Mode. */
+ void onResult(boolean supported);
+ }
+
/* package */ HdmiAudioSystemClient(IHdmiControlService service) {
super(service);
}
- /**
- * TODO(b/110094868): unhide and add @SystemApi for Q
- * @hide
- */
+ /** @hide */
+ // TODO(b/110094868): unhide and add @SystemApi for Q
@Override
public int getDeviceType() {
return HdmiDeviceInfo.DEVICE_AUDIO_SYSTEM;
}
+
+ /**
+ * Queries the connected TV to detect if System Audio Mode is supported by the TV.
+ *
+ * <p>This query may take up to 2 seconds to complete.
+ *
+ * <p>The result of the query may be cached until Audio device type is put in standby or loses
+ * its physical address.
+ */
+ void queryTvSystemAudioModeSupport(TvSystemAudioModeSupportedCallback callback) {
+ // TODO(b/80297382): implement detect TV for system audio mode support.
+ callback.onResult(true);
+ }
}