diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/CameraOptions.java b/cameraview/src/main/java/com/otaliastudios/cameraview/CameraOptions.java index ac47f247..c10abfc8 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/CameraOptions.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/CameraOptions.java @@ -55,7 +55,6 @@ public class CameraOptions { private Set supportedVideoSizes = new HashSet<>(5); private Set supportedPictureAspectRatio = new HashSet<>(4); private Set supportedVideoAspectRatio = new HashSet<>(3); - private Set supportedDisableOverlayFor = new HashSet<>(3); private boolean zoomSupported; private boolean exposureCorrectionSupported; @@ -148,12 +147,6 @@ public class CameraOptions { supportedVideoAspectRatio.add(AspectRatio.of(width, height)); } } - - - // Disable overlay for - supportedDisableOverlayFor.add(DisableOverlayFor.NONE); - supportedDisableOverlayFor.add(DisableOverlayFor.PICTURE); - supportedDisableOverlayFor.add(DisableOverlayFor.VIDEO); } // Camera2Engine constructor. @@ -319,8 +312,6 @@ public class CameraOptions { return (Collection) Arrays.asList(Engine.values()); } else if (controlClass.equals(Preview.class)) { return (Collection) Arrays.asList(Preview.values()); - } else if (controlClass.equals(DisableOverlayFor.class)) { - return (Collection) getSupportedDisableOverlayFor(); } // Unrecognized control. return Collections.emptyList(); @@ -495,18 +486,4 @@ public class CameraOptions { public float getExposureCorrectionMaxValue() { return exposureCorrectionMaxValue; } - - /** - * Set of supported mode values for which the overlay can be disabled. - * - * @see DisableOverlayFor#NONE - * @see DisableOverlayFor#PICTURE - * @see DisableOverlayFor#VIDEO - * @return a collection of supported values. - */ - @SuppressWarnings("WeakerAccess") - @NonNull - public Collection getSupportedDisableOverlayFor() { - return Collections.unmodifiableSet(supportedDisableOverlayFor); - } } diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/DisableOverlayFor.java b/cameraview/src/main/java/com/otaliastudios/cameraview/DisableOverlayFor.java deleted file mode 100644 index 1a07d80d..00000000 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/DisableOverlayFor.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.otaliastudios.cameraview; - - -import androidx.annotation.Nullable; - -import com.otaliastudios.cameraview.controls.Control; - -/** - * DisableOverlayFor value allow the user to prevent the overlay from being recorded. - * - * @see CameraView#setDisableOverlayFor(DisableOverlayFor) - */ -public enum DisableOverlayFor implements Control { - - /** - * Record the overlay both in picture and video snapshots. - */ - NONE(0), - - /** - * The picture snapshots will not contain the overlay. - * - * @see CameraOptions#getSupportedDisableOverlayFor() - */ - PICTURE(1), - - - /** - * The picture snapshots will not contain the overlay. - * - * @see CameraOptions#getSupportedDisableOverlayFor() - */ - VIDEO(2); - - static final DisableOverlayFor DEFAULT = NONE; - - private int value; - - DisableOverlayFor(int value) { - this.value = value; - } - - int value() { - return value; - } - - @Nullable - static DisableOverlayFor fromValue(int value) { - DisableOverlayFor[] list = DisableOverlayFor.values(); - for (DisableOverlayFor action : list) { - if (action.value() == value) { - return action; - } - } - return null; - } -}