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

Commit 3512bdfd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add @IntRange() to audio encoding capability apis" into sc-dev

parents 8aee3253 30852637
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21296,8 +21296,8 @@ package android.media {
  public static final class MediaCodecInfo.AudioCapabilities {
    method public android.util.Range<java.lang.Integer> getBitrateRange();
    method @NonNull public android.util.Range<java.lang.Integer>[] getInputChannelCountRanges();
    method public int getMaxInputChannelCount();
    method public int getMinInputChannelCount();
    method @IntRange(from=1, to=255) public int getMaxInputChannelCount();
    method @IntRange(from=1, to=255) public int getMinInputChannelCount();
    method public android.util.Range<java.lang.Integer>[] getSupportedSampleRateRanges();
    method public int[] getSupportedSampleRates();
    method public boolean isSampleRateSupported(int);
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.media;
import static android.media.Utils.intersectSortedDistinctRanges;
import static android.media.Utils.sortDistinctRanges;

import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SuppressLint;
@@ -1133,6 +1134,7 @@ public final class MediaCodecInfo {
         * in the ranges returned by {@link #getInputChannelCountRanges}
         *
         */
        @IntRange(from = 1, to = 255)
        public int getMaxInputChannelCount() {
            int overall_max = 0;
            for (int i = mInputChannelRanges.length - 1; i >= 0; i--) {
@@ -1151,6 +1153,7 @@ public final class MediaCodecInfo {
         * This returns the lowest channel count in the ranges returned by
         * {@link #getInputChannelCountRanges}.
         */
        @IntRange(from = 1, to = 255)
        public int getMinInputChannelCount() {
            int overall_min = MAX_INPUT_CHANNEL_COUNT;
            for (int i = mInputChannelRanges.length - 1; i >= 0; i--) {