Skip to content

Commit

Permalink
Merge "Remove the ExperimentalImageCaptureOutputFormat annotation" in…
Browse files Browse the repository at this point in the history
…to androidx-main
  • Loading branch information
Treehugger Robot authored and Gerrit Code Review committed Nov 11, 2024
2 parents 219f46c + a6352f8 commit ff2f474
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 66 deletions.
13 changes: 5 additions & 8 deletions camera/camera-core/api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ package androidx.camera.core {
@SuppressCompatibility @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalGetImage {
}

@SuppressCompatibility @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalImageCaptureOutputFormat {
}

@SuppressCompatibility @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalLensFacing {
}

Expand Down Expand Up @@ -327,7 +324,7 @@ package androidx.camera.core {
method public int getFlashMode();
method public static androidx.camera.core.ImageCaptureCapabilities getImageCaptureCapabilities(androidx.camera.core.CameraInfo);
method @IntRange(from=1, to=100) public int getJpegQuality();
method @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public int getOutputFormat();
method public int getOutputFormat();
method public androidx.camera.core.resolutionselector.ResolutionSelector? getPostviewResolutionSelector();
method public androidx.camera.core.ImageCaptureLatencyEstimate getRealtimeCaptureLatencyEstimate();
method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
Expand All @@ -354,8 +351,8 @@ package androidx.camera.core {
field public static final int FLASH_MODE_OFF = 2; // 0x2
field public static final int FLASH_MODE_ON = 1; // 0x1
field public static final int FLASH_MODE_SCREEN = 3; // 0x3
field @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public static final int OUTPUT_FORMAT_JPEG = 0; // 0x0
field @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public static final int OUTPUT_FORMAT_JPEG_ULTRA_HDR = 1; // 0x1
field public static final int OUTPUT_FORMAT_JPEG = 0; // 0x0
field public static final int OUTPUT_FORMAT_JPEG_ULTRA_HDR = 1; // 0x1
field public static final int OUTPUT_FORMAT_RAW = 2; // 0x2
field public static final int OUTPUT_FORMAT_RAW_JPEG = 3; // 0x3
}
Expand All @@ -367,7 +364,7 @@ package androidx.camera.core {
method public androidx.camera.core.ImageCapture.Builder setFlashMode(int);
method public androidx.camera.core.ImageCapture.Builder setIoExecutor(java.util.concurrent.Executor);
method public androidx.camera.core.ImageCapture.Builder setJpegQuality(@IntRange(from=1, to=100) int);
method @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public androidx.camera.core.ImageCapture.Builder setOutputFormat(int);
method public androidx.camera.core.ImageCapture.Builder setOutputFormat(int);
method public androidx.camera.core.ImageCapture.Builder setPostviewEnabled(boolean);
method public androidx.camera.core.ImageCapture.Builder setPostviewResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector);
method public androidx.camera.core.ImageCapture.Builder setResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector);
Expand Down Expand Up @@ -431,7 +428,7 @@ package androidx.camera.core {
}

public interface ImageCaptureCapabilities {
method @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public java.util.Set<java.lang.Integer!> getSupportedOutputFormats();
method public java.util.Set<java.lang.Integer!> getSupportedOutputFormats();
method public boolean isCaptureProcessProgressSupported();
method public boolean isPostviewSupported();
}
Expand Down
13 changes: 5 additions & 8 deletions camera/camera-core/api/restricted_current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ package androidx.camera.core {
@SuppressCompatibility @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalGetImage {
}

@SuppressCompatibility @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalImageCaptureOutputFormat {
}

@SuppressCompatibility @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalLensFacing {
}

Expand Down Expand Up @@ -327,7 +324,7 @@ package androidx.camera.core {
method public int getFlashMode();
method public static androidx.camera.core.ImageCaptureCapabilities getImageCaptureCapabilities(androidx.camera.core.CameraInfo);
method @IntRange(from=1, to=100) public int getJpegQuality();
method @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public int getOutputFormat();
method public int getOutputFormat();
method public androidx.camera.core.resolutionselector.ResolutionSelector? getPostviewResolutionSelector();
method public androidx.camera.core.ImageCaptureLatencyEstimate getRealtimeCaptureLatencyEstimate();
method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
Expand All @@ -354,8 +351,8 @@ package androidx.camera.core {
field public static final int FLASH_MODE_OFF = 2; // 0x2
field public static final int FLASH_MODE_ON = 1; // 0x1
field public static final int FLASH_MODE_SCREEN = 3; // 0x3
field @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public static final int OUTPUT_FORMAT_JPEG = 0; // 0x0
field @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public static final int OUTPUT_FORMAT_JPEG_ULTRA_HDR = 1; // 0x1
field public static final int OUTPUT_FORMAT_JPEG = 0; // 0x0
field public static final int OUTPUT_FORMAT_JPEG_ULTRA_HDR = 1; // 0x1
field public static final int OUTPUT_FORMAT_RAW = 2; // 0x2
field public static final int OUTPUT_FORMAT_RAW_JPEG = 3; // 0x3
}
Expand All @@ -367,7 +364,7 @@ package androidx.camera.core {
method public androidx.camera.core.ImageCapture.Builder setFlashMode(int);
method public androidx.camera.core.ImageCapture.Builder setIoExecutor(java.util.concurrent.Executor);
method public androidx.camera.core.ImageCapture.Builder setJpegQuality(@IntRange(from=1, to=100) int);
method @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public androidx.camera.core.ImageCapture.Builder setOutputFormat(int);
method public androidx.camera.core.ImageCapture.Builder setOutputFormat(int);
method public androidx.camera.core.ImageCapture.Builder setPostviewEnabled(boolean);
method public androidx.camera.core.ImageCapture.Builder setPostviewResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector);
method public androidx.camera.core.ImageCapture.Builder setResolutionSelector(androidx.camera.core.resolutionselector.ResolutionSelector);
Expand Down Expand Up @@ -431,7 +428,7 @@ package androidx.camera.core {
}

public interface ImageCaptureCapabilities {
method @SuppressCompatibility @androidx.camera.core.ExperimentalImageCaptureOutputFormat public java.util.Set<java.lang.Integer!> getSupportedOutputFormats();
method public java.util.Set<java.lang.Integer!> getSupportedOutputFormats();
method public boolean isCaptureProcessProgressSupported();
method public boolean isPostviewSupported();
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ public final class ImageCapture extends UseCase {
* Captures 8-bit standard dynamic range (SDR) images using the {@link ImageFormat#JPEG}
* image format.
*/
@ExperimentalImageCaptureOutputFormat
public static final int OUTPUT_FORMAT_JPEG = 0;

/**
Expand All @@ -312,7 +311,6 @@ public final class ImageCapture extends UseCase {
* <p>For more information see
* <a href="https://developer.android.com/media/grow/ultra-hdr">Support Ultra HDR</a>.
*/
@ExperimentalImageCaptureOutputFormat
public static final int OUTPUT_FORMAT_JPEG_ULTRA_HDR = 1;

/**
Expand Down Expand Up @@ -531,7 +529,6 @@ private static boolean isImageFormatSupported(List<Pair<Integer, Size[]>> suppor
return false;
}

@OptIn(markerClass = ExperimentalImageCaptureOutputFormat.class)
private static boolean isOutputFormatUltraHdr(@NonNull MutableConfig config) {
return Objects.equals(config.retrieveOption(OPTION_OUTPUT_FORMAT, null),
OUTPUT_FORMAT_JPEG_ULTRA_HDR);
Expand Down Expand Up @@ -891,7 +888,6 @@ public ResolutionSelector getResolutionSelector() {
*
* @see ImageCapture.Builder#setOutputFormat(int)
*/
@ExperimentalImageCaptureOutputFormat
@OutputFormat
public int getOutputFormat() {
return checkNotNull(getCurrentConfig().retrieveOption(OPTION_OUTPUT_FORMAT,
Expand Down Expand Up @@ -1047,7 +1043,6 @@ public boolean isCaptureProcessProgressSupported() {
return false;
}

@ExperimentalImageCaptureOutputFormat
@NonNull
@Override
public Set<@OutputFormat Integer> getSupportedOutputFormats() {
Expand Down Expand Up @@ -1090,7 +1085,6 @@ private boolean isRawSupported() {
return false;
}

@OptIn(markerClass = ExperimentalImageCaptureOutputFormat.class)
@Nullable
private Set<Integer> getSupportedOutputFormatsFromAdapterCameraInfo() {
if (!(mCameraInfo instanceof AdapterCameraInfo)) {
Expand Down Expand Up @@ -1377,8 +1371,7 @@ public ListenableFuture<Void> submitStillCaptureRequests(
/**
* Creates the pipeline for both capture request configuration and image post-processing.
*/
@OptIn(markerClass = {ExperimentalZeroShutterLag.class,
ExperimentalImageCaptureOutputFormat.class})
@OptIn(markerClass = {ExperimentalZeroShutterLag.class})
@MainThread
private SessionConfig.Builder createPipeline(@NonNull String cameraId,
@NonNull ImageCaptureConfig config, @NonNull StreamSpec streamSpec) {
Expand Down Expand Up @@ -1785,7 +1778,6 @@ public ResolutionSelector getPostviewResolutionSelector() {
/**
* The output format of the captured image.
*/
@OptIn(markerClass = androidx.camera.core.ExperimentalImageCaptureOutputFormat.class)
@Target({ElementType.TYPE_USE})
@IntDef({OUTPUT_FORMAT_JPEG, OUTPUT_FORMAT_JPEG_ULTRA_HDR,
OUTPUT_FORMAT_RAW, OUTPUT_FORMAT_RAW_JPEG})
Expand Down Expand Up @@ -2050,7 +2042,6 @@ public interface ScreenFlash {
* <p>These values may be overridden by the implementation. They only provide a minimum set of
* defaults that are implementation independent.
*/
@OptIn(markerClass = androidx.camera.core.ExperimentalImageCaptureOutputFormat.class)
@RestrictTo(Scope.LIBRARY_GROUP)
public static final class Defaults
implements ConfigProvider<ImageCaptureConfig> {
Expand Down Expand Up @@ -3047,7 +3038,6 @@ public Builder setDefaultSessionConfig(@NonNull SessionConfig sessionConfig) {
* @see OutputFormat
* @see ImageCaptureCapabilities#getSupportedOutputFormats()
*/
@ExperimentalImageCaptureOutputFormat
@NonNull
public Builder setOutputFormat(@OutputFormat int outputFormat) {
getMutableConfig().insertOption(OPTION_OUTPUT_FORMAT, outputFormat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public interface ImageCaptureCapabilities {
*
* @see ImageCapture.Builder#setOutputFormat(int)
*/
@ExperimentalImageCaptureOutputFormat
@NonNull
Set<@ImageCapture.OutputFormat Integer> getSupportedOutputFormats();
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.OptIn;
import androidx.annotation.VisibleForTesting;
import androidx.camera.core.Camera;
import androidx.camera.core.CameraControl;
Expand Down Expand Up @@ -1070,7 +1069,6 @@ private static boolean isNotSdr(@NonNull DynamicRange dynamicRange) {
return is10Bit || isHdr;
}

@OptIn(markerClass = androidx.camera.core.ExperimentalImageCaptureOutputFormat.class)
private static boolean hasUltraHdrImageCapture(@NonNull Collection<UseCase> useCases) {
for (UseCase useCase : useCases) {
if (!isImageCapture(useCase)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
import androidx.camera.core.CameraSelector;
import androidx.camera.core.DisplayOrientedMeteringPointFactory;
import androidx.camera.core.DynamicRange;
import androidx.camera.core.ExperimentalImageCaptureOutputFormat;
import androidx.camera.core.ExperimentalLensFacing;
import androidx.camera.core.ExposureState;
import androidx.camera.core.FocusMeteringAction;
Expand Down Expand Up @@ -189,7 +188,6 @@
* lifecycle events are handled internally by CameraX.
*/
@SuppressLint("NullAnnotationGroup")
@OptIn(markerClass = ExperimentalImageCaptureOutputFormat.class)
public class CameraXActivity extends AppCompatActivity {
private static final String TAG = "CameraXActivity";
private static final String[] REQUIRED_PERMISSIONS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
import androidx.camera.core.CameraControl;
import androidx.camera.core.CameraInfo;
import androidx.camera.core.CameraSelector;
import androidx.camera.core.ExperimentalImageCaptureOutputFormat;
import androidx.camera.core.FocusMeteringAction;
import androidx.camera.core.FocusMeteringResult;
import androidx.camera.core.ImageCapture;
Expand Down Expand Up @@ -137,7 +136,6 @@
import java.util.Set;

/** An activity that shows off how extensions can be applied */
@OptIn(markerClass = ExperimentalImageCaptureOutputFormat.class)
public class CameraExtensionsActivity extends AppCompatActivity
implements ActivityCompat.OnRequestPermissionsResultCallback {

Expand Down

0 comments on commit ff2f474

Please sign in to comment.