OSDN Git Service

Move queryTvSystemAudioModeSupport to HdmiCecLocalDeviceAudioSystem
authorNick Chalko <nchalko@google.com>
Thu, 14 Jun 2018 14:46:00 +0000 (07:46 -0700)
committerNick Chalko <nchalko@google.com>
Wed, 18 Jul 2018 18:50:23 +0000 (11:50 -0700)
Bug: 80297382
Test: m -j services.core framework
Change-Id: I58789fdcf5208ac334e0d696fa769527d61847cc
(cherry picked from commit ff23fbf2b33602dcccb9b1460275d2d748c6dd7e)

core/java/android/hardware/hdmi/HdmiAudioSystemClient.java
services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java

index 3622650..6b456f5 100644 (file)
@@ -27,12 +27,7 @@ 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);
@@ -45,16 +40,5 @@ public final class HdmiAudioSystemClient extends HdmiClient {
         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);
-    }
+
 }
index 3ededfd..bf392aa 100644 (file)
@@ -250,4 +250,25 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDevice {
             return mSystemAudioControlFeatureEnabled;
         }
     }
+
+    /** 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);
+
+    }
+
+    /**
+     * 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);
+    }
 }