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

Commit f9b15540 authored by Avichal Rakesh's avatar Avichal Rakesh Committed by Android (Google) Code Review
Browse files

Merge "Camera2: Deprecate EXTENSION_BEAUTY and add EXTENSION_FACE_RETOUCH"

parents c025e147 e5f19d12
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18163,8 +18163,9 @@ package android.hardware.camera2 {
    method @NonNull public java.util.List<android.util.Size> getExtensionSupportedSizes(int, int);
    method @NonNull public java.util.List<java.lang.Integer> getSupportedExtensions();
    field public static final int EXTENSION_AUTOMATIC = 0; // 0x0
    field public static final int EXTENSION_BEAUTY = 1; // 0x1
    field @Deprecated public static final int EXTENSION_BEAUTY = 1; // 0x1
    field public static final int EXTENSION_BOKEH = 2; // 0x2
    field public static final int EXTENSION_FACE_RETOUCH = 1; // 0x1
    field public static final int EXTENSION_HDR = 3; // 0x3
    field public static final int EXTENSION_NIGHT = 4; // 0x4
  }
+16 −9
Original line number Diff line number Diff line
@@ -15,12 +15,13 @@
 */
package android.hardware.camera2;

import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.graphics.ImageFormat;
import android.hardware.camera2.extension.IAdvancedExtenderImpl;
import android.hardware.camera2.extension.ICameraExtensionsProxyService;
@@ -35,24 +36,22 @@ import android.os.ConditionVariable;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.util.Log;
import android.util.Pair;
import android.util.Range;
import android.util.Size;

import java.util.HashSet;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.List;
import java.util.Objects;

/**
 * <p>Allows clients to query availability and supported resolutions of camera extensions.</p>
@@ -96,7 +95,15 @@ public final class CameraExtensionCharacteristics {
     * Device-specific extension implementation which tends to smooth the skin and apply other
     * cosmetic effects to people's faces.
     */
    public static final int EXTENSION_BEAUTY = 1;
    public static final int EXTENSION_FACE_RETOUCH = 1;

    /**
     * Device-specific extension implementation which tends to smooth the skin and apply other
     * cosmetic effects to people's faces.
     *
     * @deprecated Use {@link #EXTENSION_FACE_RETOUCH} instead.
     */
    public @Deprecated static final int EXTENSION_BEAUTY = EXTENSION_FACE_RETOUCH;

    /**
     * Device-specific extension implementation which can blur certain regions of the final image
@@ -121,7 +128,7 @@ public final class CameraExtensionCharacteristics {
     */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef(flag = true, value = {EXTENSION_AUTOMATIC,
                EXTENSION_BEAUTY,
                EXTENSION_FACE_RETOUCH,
                EXTENSION_BOKEH,
                EXTENSION_HDR,
                EXTENSION_NIGHT})
@@ -145,7 +152,7 @@ public final class CameraExtensionCharacteristics {
    private static final @Extension
    int[] EXTENSION_LIST = new int[]{
            EXTENSION_AUTOMATIC,
            EXTENSION_BEAUTY,
            EXTENSION_FACE_RETOUCH,
            EXTENSION_BOKEH,
            EXTENSION_HDR,
            EXTENSION_NIGHT};