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

Commit ceb7f011 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Android (Google) Code Review
Browse files

Merge "Add analog force mode for analog/digital hybrid modes."

parents 679cb710 5f0fbaef
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -83,6 +83,10 @@ public class RadioModule extends RadioTuner {

    public native @NonNull List<RadioManager.ProgramInfo> getProgramList(@Nullable String filter);

    public native boolean isAnalogForced();

    public native void setAnalogForced(boolean isForced);

    public native boolean isAntennaConnected();

    public native boolean hasControl();
+26 −0
Original line number Diff line number Diff line
@@ -243,6 +243,32 @@ public abstract class RadioTuner {
     */
    public abstract @NonNull List<RadioManager.ProgramInfo> getProgramList(@Nullable String filter);

    /**
     * Checks, if the analog playback is forced, see setAnalogForced.
     *
     * @throws IllegalStateException if the switch is not supported at current
     *         configuration.
     * @return {@code true} if analog is forced, {@code false} otherwise.
     * @hide FutureFeature
     */
    public abstract boolean isAnalogForced();

    /**
     * Forces the analog playback for the supporting radio technology.
     *
     * User may disable digital playback for FM HD Radio or hybrid FM/DAB with
     * this option. This is purely user choice, ie. does not reflect digital-
     * analog handover managed from the HAL implementation side.
     *
     * Some radio technologies may not support this, ie. DAB.
     *
     * @param isForced {@code true} to force analog, {@code false} for a default behaviour.
     * @throws IllegalStateException if the switch is not supported at current
     *         configuration.
     * @hide FutureFeature
     */
    public abstract void setAnalogForced(boolean isForced);

    /**
     * Get current antenna connection state for current configuration.
     * Only valid if a configuration has been applied.