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

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

Merge "Camera: Update "RecommendedStreamConfigurationMap" annotations"

parents 981b0a76 98decf53
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -17366,11 +17366,11 @@ package android.hardware.camera2.params {
    method @Nullable public java.util.Set<android.util.Size> getInputSizes(int);
    method @NonNull public java.util.Set<java.lang.Integer> getOutputFormats();
    method @IntRange(from=0) public long getOutputMinFrameDuration(int, @NonNull android.util.Size);
    method public <T> long getOutputMinFrameDuration(@NonNull Class<T>, @NonNull android.util.Size);
    method @IntRange(from=0) public <T> long getOutputMinFrameDuration(@NonNull Class<T>, @NonNull android.util.Size);
    method @Nullable public java.util.Set<android.util.Size> getOutputSizes(int);
    method public <T> java.util.Set<android.util.Size> getOutputSizes(@NonNull Class<T>);
    method @Nullable public <T> java.util.Set<android.util.Size> getOutputSizes(@NonNull Class<T>);
    method @IntRange(from=0) public long getOutputStallDuration(int, @NonNull android.util.Size);
    method public <T> long getOutputStallDuration(@NonNull Class<T>, @NonNull android.util.Size);
    method @IntRange(from=0) public <T> long getOutputStallDuration(@NonNull Class<T>, @NonNull android.util.Size);
    method public int getRecommendedUseCase();
    method @Nullable public java.util.Set<java.lang.Integer> getValidOutputFormatsForInput(int);
    method public boolean isOutputSupportedFor(int);
+12 −10
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.ImageFormat;
import android.graphics.ImageFormat.Format;
import android.graphics.PixelFormat;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraDevice;
@@ -226,7 +227,7 @@ public final class RecommendedStreamConfigurationMap {
     *
     * @return a non-modifiable set of Integer formats
     */
    public @Nullable Set<Integer> getValidOutputFormatsForInput(int inputFormat) {
    public @Nullable Set<Integer> getValidOutputFormatsForInput(@Format int inputFormat) {
        return getUnmodifiableIntegerSet(mRecommendedMap.getValidOutputFormatsForInput(
                    inputFormat));
    }
@@ -262,7 +263,7 @@ public final class RecommendedStreamConfigurationMap {
     * @param format a format from {@link #getInputFormats}
     * @return a non-modifiable set of sizes, or {@code null} if the format was not available.
     */
    public @Nullable Set<Size> getInputSizes(int format) {
    public @Nullable Set<Size> getInputSizes(@Format int format) {
        return getUnmodifiableSizeSet(mRecommendedMap.getInputSizes(format));
    }

@@ -284,7 +285,7 @@ public final class RecommendedStreamConfigurationMap {
     *          if the image format was not a defined named constant
     *          from either {@link ImageFormat} or {@link PixelFormat}
     */
    public boolean isOutputSupportedFor(int format) {
    public boolean isOutputSupportedFor(@Format int format) {
        return mRecommendedMap.isOutputSupportedFor(format);
    }

@@ -300,7 +301,7 @@ public final class RecommendedStreamConfigurationMap {
     * @return  a non-modifiable set of supported sizes,
     *          or {@code null} if the {@code format} is not a supported output
     */
    public @Nullable Set<Size> getOutputSizes(int format) {
    public @Nullable Set<Size> getOutputSizes(@Format int format) {
        return getUnmodifiableSizeSet(mRecommendedMap.getOutputSizes(format));
    }

@@ -384,7 +385,7 @@ public final class RecommendedStreamConfigurationMap {
     * @return a non-modifiable set of supported slower high-resolution sizes, or {@code null} if
     *         the BURST_CAPTURE capability is not supported
     */
    public @Nullable Set<Size> getHighResolutionOutputSizes(int format) {
    public @Nullable Set<Size> getHighResolutionOutputSizes(@Format int format) {
        return getUnmodifiableSizeSet(mRecommendedMap.getHighResolutionOutputSizes(format));
    }

@@ -404,7 +405,8 @@ public final class RecommendedStreamConfigurationMap {
     *
     * @throws IllegalArgumentException if {@code format} or {@code size} was not supported
     */
    public @IntRange(from = 0) long getOutputMinFrameDuration(int format, @NonNull Size size) {
    public @IntRange(from = 0) long getOutputMinFrameDuration(@Format int format,
            @NonNull Size size) {
        return mRecommendedMap.getOutputMinFrameDuration(format, size);
    }

@@ -421,7 +423,7 @@ public final class RecommendedStreamConfigurationMap {
     *
     * @throws IllegalArgumentException if {@code format} or {@code size} was not supported
     */
    public @IntRange(from = 0) long getOutputStallDuration(int format, @NonNull Size size) {
    public @IntRange(from = 0) long getOutputStallDuration(@Format int format, @NonNull Size size) {
        return mRecommendedMap.getOutputStallDuration(format, size);
    }

@@ -437,7 +439,7 @@ public final class RecommendedStreamConfigurationMap {
     *          a non-modifiable set of supported sizes for {@link ImageFormat#PRIVATE} format,
     *          or {@code null} if the {@code klass} is not a supported output.
     */
    public <T> @Nullable Set<Size> getOutputSizes(@NonNull Class<T> klass) {
    public @Nullable <T> Set<Size> getOutputSizes(@NonNull Class<T> klass) {
        if (mSupportsPrivate) {
            return getUnmodifiableSizeSet(mRecommendedMap.getOutputSizes(klass));
        }
@@ -460,7 +462,7 @@ public final class RecommendedStreamConfigurationMap {
     *
     * @throws IllegalArgumentException if {@code klass} or {@code size} was not supported
     */
    public <T> @IntRange(from = 0) long getOutputMinFrameDuration(@NonNull final Class<T> klass,
    public @IntRange(from = 0) <T> long getOutputMinFrameDuration(@NonNull final Class<T> klass,
            @NonNull final Size size) {
        if (mSupportsPrivate) {
            return mRecommendedMap.getOutputMinFrameDuration(klass, size);
@@ -483,7 +485,7 @@ public final class RecommendedStreamConfigurationMap {
     *
     * @throws IllegalArgumentException if {@code klass} or {@code size} was not supported
     */
    public <T> @IntRange(from = 0) long getOutputStallDuration(@NonNull final Class<T> klass,
    public @IntRange(from = 0) <T> long getOutputStallDuration(@NonNull final Class<T> klass,
            @NonNull final Size size) {
        if (mSupportsPrivate) {
            return mRecommendedMap.getOutputStallDuration(klass, size);