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

Commit 17d4981a authored by Amy Zhang's avatar Amy Zhang Committed by Android (Google) Code Review
Browse files

Merge "Add IntRange for getEndFrequency in FrontendSettings"

parents 8802227a 7a3428a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6071,7 +6071,7 @@ package android.media.tv.tuner.frontend {
  }
  public abstract class FrontendSettings {
    method public int getEndFrequency();
    method @IntRange(from=1) public int getEndFrequency();
    method public int getFrequency();
    method public int getFrontendSpectralInversion();
    method public abstract int getType();
+1 −1
Original line number Diff line number Diff line
@@ -6011,7 +6011,7 @@ package android.media.tv.tuner.frontend {
  }
  public abstract class FrontendSettings {
    method public int getEndFrequency();
    method @IntRange(from=1) public int getEndFrequency();
    method public int getFrequency();
    method public int getFrontendSpectralInversion();
    method public abstract int getType();
+5 −0
Original line number Diff line number Diff line
@@ -302,6 +302,7 @@ public abstract class FrontendSettings {
     *
     * @return the end frequency in Hz.
     */
    @IntRange(from = 1)
    public int getEndFrequency() {
        return mEndFrequency;
    }
@@ -341,11 +342,15 @@ public abstract class FrontendSettings {
     *
     * @param endFrequency the end frequency used during blind scan. The default value is
     * {@link android.media.tv.tuner.Tuner#INVALID_FRONTEND_SETTING_FREQUENCY}.
     * @throws IllegalArgumentException if the {@code endFrequency} is not greater than 0.
     */
    @IntRange(from = 1)
    public void setEndFrequency(int endFrequency) {
        if (TunerVersionChecker.checkHigherOrEqualVersionTo(
                TunerVersionChecker.TUNER_VERSION_1_1, "setEndFrequency")) {
            if (endFrequency < 1) {
                throw new IllegalArgumentException("endFrequency must be greater than 0");
            }
            mEndFrequency = endFrequency;
        }
    }