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

Commit 27bab9b6 authored by Amy Zhang's avatar Amy Zhang
Browse files

Deprecate DvrPlayback.attach/detachFilter() and DvbcFrontendSettings#SpectralInversion

DvrPlayback.attach/detachFilter() are not valid for Dvr playback. They
are no-op now.

DvbcFrontendSettings#SpectralInversion is replaced with
FrontendSettings#FrontendSpectralInversion since the spectral setting is
a general FrontendSettings in Tuner 1.1.

Test: make
Bug: b/155435894
Bug: b/158818695
Change-Id: I77f81a4b6d3dca1ad30e50cac6bb721888f71a60
parent 3e7c2863
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -5089,10 +5089,10 @@ package android.media.tv.tuner {
package android.media.tv.tuner.dvr {
  public class DvrPlayback implements java.lang.AutoCloseable {
    method public int attachFilter(@NonNull android.media.tv.tuner.filter.Filter);
    method @Deprecated public int attachFilter(@NonNull android.media.tv.tuner.filter.Filter);
    method public void close();
    method public int configure(@NonNull android.media.tv.tuner.dvr.DvrSettings);
    method public int detachFilter(@NonNull android.media.tv.tuner.filter.Filter);
    method @Deprecated public int detachFilter(@NonNull android.media.tv.tuner.filter.Filter);
    method public int flush();
    method public long read(long);
    method public long read(@NonNull byte[], long, long);
@@ -5683,9 +5683,9 @@ package android.media.tv.tuner.frontend {
    field public static final int OUTER_FEC_OUTER_FEC_NONE = 1; // 0x1
    field public static final int OUTER_FEC_OUTER_FEC_RS = 2; // 0x2
    field public static final int OUTER_FEC_UNDEFINED = 0; // 0x0
    field public static final int SPECTRAL_INVERSION_INVERTED = 2; // 0x2
    field public static final int SPECTRAL_INVERSION_NORMAL = 1; // 0x1
    field public static final int SPECTRAL_INVERSION_UNDEFINED = 0; // 0x0
    field @Deprecated public static final int SPECTRAL_INVERSION_INVERTED = 2; // 0x2
    field @Deprecated public static final int SPECTRAL_INVERSION_NORMAL = 1; // 0x1
    field @Deprecated public static final int SPECTRAL_INVERSION_UNDEFINED = 0; // 0x0
    field public static final int TIME_INTERLEAVE_MODE_128_1_0 = 2; // 0x2
    field public static final int TIME_INTERLEAVE_MODE_128_1_1 = 4; // 0x4
    field public static final int TIME_INTERLEAVE_MODE_128_2 = 128; // 0x80
+6 −4
Original line number Diff line number Diff line
@@ -123,13 +123,14 @@ public class DvrPlayback implements AutoCloseable {
    /**
     * Attaches a filter to DVR interface for playback.
     *
     * <p>This method will be deprecated. Now it's a no-op.
     * <p>Filters opened by {@link Tuner#openFilter} are used for DVR playback.
     * @deprecated attaching filters is not valid in Dvr Playback use case. This API is a no-op.
     *             Filters opened by {@link Tuner#openFilter} are used for DVR playback.
     *
     * @param filter the filter to be attached.
     * @return result status of the operation.
     */
    @Result
    @Deprecated
    public int attachFilter(@NonNull Filter filter) {
        // no-op
        return Tuner.RESULT_UNAVAILABLE;
@@ -138,13 +139,14 @@ public class DvrPlayback implements AutoCloseable {
    /**
     * Detaches a filter from DVR interface.
     *
     * <p>This method will be deprecated. Now it's a no-op.
     * <p>Filters opened by {@link Tuner#openFilter} are used for DVR playback.
     * @deprecated detaching filters is not valid in Dvr Playback use case. This API is a no-op.
     *             Filters opened by {@link Tuner#openFilter} are used for DVR playback.
     *
     * @param filter the filter to be detached.
     * @return result status of the operation.
     */
    @Result
    @Deprecated
    public int detachFilter(@NonNull Filter filter) {
        // no-op
        return Tuner.RESULT_UNAVAILABLE;
+14 −1
Original line number Diff line number Diff line
@@ -119,7 +119,11 @@ public class DvbcFrontendSettings extends FrontendSettings {
    public static final int ANNEX_C = Constants.FrontendDvbcAnnex.C;


    /** @hide */
    /**
     * @deprecated Use the {@link FrontendSettings#FrontendSpectralInversion} instead.
     * @hide
     */
    @Deprecated
    @IntDef(prefix = "SPECTRAL_INVERSION_",
            value = {SPECTRAL_INVERSION_UNDEFINED, SPECTRAL_INVERSION_NORMAL,
                    SPECTRAL_INVERSION_INVERTED})
@@ -128,17 +132,26 @@ public class DvbcFrontendSettings extends FrontendSettings {

    /**
     * Spectral Inversion Type undefined.
     *
     * @deprecated Use the {@link FrontendSettings#FRONTEND_SPECTRAL_INVERSION_UNDEFINED} instead.
     */
    @Deprecated
    public static final int SPECTRAL_INVERSION_UNDEFINED =
            Constants.FrontendDvbcSpectralInversion.UNDEFINED;
    /**
     * Normal Spectral Inversion.
     *
     * @deprecated Use the {@link FrontendSettings#FRONTEND_SPECTRAL_INVERSION_NORMAL} instead.
     */
    @Deprecated
    public static final int SPECTRAL_INVERSION_NORMAL =
            Constants.FrontendDvbcSpectralInversion.NORMAL;
    /**
     * Inverted Spectral Inversion.
     *
     * @deprecated Use the {@link FrontendSettings#FRONTEND_SPECTRAL_INVERSION_INVERTED} instead.
     */
    @Deprecated
    public static final int SPECTRAL_INVERSION_INVERTED =
            Constants.FrontendDvbcSpectralInversion.INVERTED;

+5 −5
Original line number Diff line number Diff line
@@ -5029,10 +5029,10 @@ package android.media.tv.tuner {
package android.media.tv.tuner.dvr {
  public class DvrPlayback implements java.lang.AutoCloseable {
    method public int attachFilter(@NonNull android.media.tv.tuner.filter.Filter);
    method @Deprecated public int attachFilter(@NonNull android.media.tv.tuner.filter.Filter);
    method public void close();
    method public int configure(@NonNull android.media.tv.tuner.dvr.DvrSettings);
    method public int detachFilter(@NonNull android.media.tv.tuner.filter.Filter);
    method @Deprecated public int detachFilter(@NonNull android.media.tv.tuner.filter.Filter);
    method public int flush();
    method public long read(long);
    method public long read(@NonNull byte[], long, long);
@@ -5623,9 +5623,9 @@ package android.media.tv.tuner.frontend {
    field public static final int OUTER_FEC_OUTER_FEC_NONE = 1; // 0x1
    field public static final int OUTER_FEC_OUTER_FEC_RS = 2; // 0x2
    field public static final int OUTER_FEC_UNDEFINED = 0; // 0x0
    field public static final int SPECTRAL_INVERSION_INVERTED = 2; // 0x2
    field public static final int SPECTRAL_INVERSION_NORMAL = 1; // 0x1
    field public static final int SPECTRAL_INVERSION_UNDEFINED = 0; // 0x0
    field @Deprecated public static final int SPECTRAL_INVERSION_INVERTED = 2; // 0x2
    field @Deprecated public static final int SPECTRAL_INVERSION_NORMAL = 1; // 0x1
    field @Deprecated public static final int SPECTRAL_INVERSION_UNDEFINED = 0; // 0x0
    field public static final int TIME_INTERLEAVE_MODE_128_1_0 = 2; // 0x2
    field public static final int TIME_INTERLEAVE_MODE_128_1_1 = 4; // 0x4
    field public static final int TIME_INTERLEAVE_MODE_128_2 = 128; // 0x80