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

Commit c6334158 authored by Weilin Xu's avatar Weilin Xu
Browse files

Deprecate radio system APIs for Android 15

Bug: 318362428
Test: atest CtsBroadcastRadioTestCases
Change-Id: I73d8b105600cc4f733b87f7fa0dc7ec95c4aa14f
parent fdb20d03
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -5755,7 +5755,7 @@ package android.hardware.radio {
    method public void addOnCompleteListener(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.radio.ProgramList.OnCompleteListener);
    method public void addOnCompleteListener(@NonNull android.hardware.radio.ProgramList.OnCompleteListener);
    method public void close();
    method @Nullable public android.hardware.radio.RadioManager.ProgramInfo get(@NonNull android.hardware.radio.ProgramSelector.Identifier);
    method @Deprecated @Nullable public android.hardware.radio.RadioManager.ProgramInfo get(@NonNull android.hardware.radio.ProgramSelector.Identifier);
    method @FlaggedApi("android.hardware.radio.hd_radio_improved") @NonNull public java.util.List<android.hardware.radio.RadioManager.ProgramInfo> getProgramInfos(@NonNull android.hardware.radio.ProgramSelector.Identifier);
    method public void registerListCallback(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.radio.ProgramList.ListCallback);
    method public void registerListCallback(@NonNull android.hardware.radio.ProgramList.ListCallback);
@@ -5807,7 +5807,7 @@ package android.hardware.radio {
    field @Deprecated public static final int IDENTIFIER_TYPE_DAB_SIDECC = 5; // 0x5
    field @Deprecated public static final int IDENTIFIER_TYPE_DAB_SID_EXT = 5; // 0x5
    field public static final int IDENTIFIER_TYPE_DRMO_FREQUENCY = 10; // 0xa
    field public static final int IDENTIFIER_TYPE_DRMO_MODULATION = 11; // 0xb
    field @Deprecated public static final int IDENTIFIER_TYPE_DRMO_MODULATION = 11; // 0xb
    field public static final int IDENTIFIER_TYPE_DRMO_SERVICE_ID = 9; // 0x9
    field public static final int IDENTIFIER_TYPE_HD_STATION_ID_EXT = 3; // 0x3
    field @FlaggedApi("android.hardware.radio.hd_radio_improved") public static final int IDENTIFIER_TYPE_HD_STATION_LOCATION = 15; // 0xf
@@ -5815,8 +5815,8 @@ package android.hardware.radio {
    field @Deprecated public static final int IDENTIFIER_TYPE_HD_SUBCHANNEL = 4; // 0x4
    field public static final int IDENTIFIER_TYPE_INVALID = 0; // 0x0
    field public static final int IDENTIFIER_TYPE_RDS_PI = 2; // 0x2
    field public static final int IDENTIFIER_TYPE_SXM_CHANNEL = 13; // 0xd
    field public static final int IDENTIFIER_TYPE_SXM_SERVICE_ID = 12; // 0xc
    field @Deprecated public static final int IDENTIFIER_TYPE_SXM_CHANNEL = 13; // 0xd
    field @Deprecated public static final int IDENTIFIER_TYPE_SXM_SERVICE_ID = 12; // 0xc
    field public static final int IDENTIFIER_TYPE_VENDOR_END = 1999; // 0x7cf
    field @Deprecated public static final int IDENTIFIER_TYPE_VENDOR_PRIMARY_END = 1999; // 0x7cf
    field @Deprecated public static final int IDENTIFIER_TYPE_VENDOR_PRIMARY_START = 1000; // 0x3e8
@@ -5869,7 +5869,7 @@ package android.hardware.radio {
    field public static final int CONFIG_DAB_DAB_SOFT_LINKING = 8; // 0x8
    field public static final int CONFIG_DAB_FM_LINKING = 7; // 0x7
    field public static final int CONFIG_DAB_FM_SOFT_LINKING = 9; // 0x9
    field public static final int CONFIG_FORCE_ANALOG = 2; // 0x2
    field @Deprecated public static final int CONFIG_FORCE_ANALOG = 2; // 0x2
    field @FlaggedApi("android.hardware.radio.hd_radio_improved") public static final int CONFIG_FORCE_ANALOG_AM = 11; // 0xb
    field @FlaggedApi("android.hardware.radio.hd_radio_improved") public static final int CONFIG_FORCE_ANALOG_FM = 10; // 0xa
    field public static final int CONFIG_FORCE_DIGITAL = 3; // 0x3
+4 −0
Original line number Diff line number Diff line
@@ -304,7 +304,11 @@ public final class ProgramList implements AutoCloseable {
     *
     * @param id primary identifier of a program to fetch
     * @return the program info, or null if there is no such program on the list
     *
     * @deprecated Use {@link #getProgramInfos(ProgramSelector.Identifier)} to get all programs
     * with the given primary identifier
     */
    @Deprecated
    public @Nullable RadioManager.ProgramInfo get(@NonNull ProgramSelector.Identifier id) {
        Map<UniqueProgramIdentifier, RadioManager.ProgramInfo> entries;
        synchronized (mLock) {
+8 −0
Original line number Diff line number Diff line
@@ -312,15 +312,23 @@ public final class ProgramSelector implements Parcelable {
    public static final int IDENTIFIER_TYPE_DRMO_FREQUENCY = 10;
    /**
     * 1: AM, 2:FM
     * @deprecated use {@link #IDENTIFIER_TYPE_DRMO_FREQUENCY} instead
     */
    @Deprecated
    public static final int IDENTIFIER_TYPE_DRMO_MODULATION = 11;
    /**
     * 32bit primary identifier for SiriusXM Satellite Radio.
     *
     * @deprecated SiriusXM Satellite Radio is not supported
     */
    @Deprecated
    public static final int IDENTIFIER_TYPE_SXM_SERVICE_ID = 12;
    /**
     * 0-999 range
     *
     * @deprecated SiriusXM Satellite Radio is not supported
     */
    @Deprecated
    public static final int IDENTIFIER_TYPE_SXM_CHANNEL = 13;
    /**
     * 44bit compound primary identifier for Digital Audio Broadcasting and
+5 −0
Original line number Diff line number Diff line
@@ -166,7 +166,12 @@ public class RadioManager {
     * analog handover state managed from the HAL implementation side.
     *
     * <p>Some radio technologies may not support this, i.e. DAB.
     *
     * @deprecated Use {@link #CONFIG_FORCE_ANALOG_FM} instead. If {@link #CONFIG_FORCE_ANALOG_FM}
     * is supported in HAL, {@link RadioTuner#setConfigFlag} and {@link RadioTuner#isConfigFlagSet}
     * with CONFIG_FORCE_ANALOG will set/get the value of {@link #CONFIG_FORCE_ANALOG_FM}.
     */
    @Deprecated
    public static final int CONFIG_FORCE_ANALOG = 2;
    /**
     * Forces the digital playback for the supporting radio technology.