Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f28c7b56 authored by Nick Chalko's avatar Nick Chalko
Browse files

Move queryTvSystemAudioModeSupport to HdmiCecLocalDeviceAudioSystem

Bug: 80297382
Test: m -j services.core framework
Change-Id: I58789fdcf5208ac334e0d696fa769527d61847cc
(cherry picked from commit ff23fbf2b33602dcccb9b1460275d2d748c6dd7e)
parent 6d9da80f
Loading
Loading
Loading
Loading
+1 −17
Original line number Diff line number Diff line
@@ -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);
    }

}
+21 −0
Original line number Diff line number Diff line
@@ -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);
    }
}