diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 5b4c565e808e8..9783ada494e20 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -2698,7 +2698,13 @@ package android.app.wallpapereffectsgeneration { method @NonNull public String getTaskId(); method @NonNull public java.util.List getTexturedMeshes(); method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int CINEMATIC_EFFECT_STATUS_ANIMATION_FAILURE = 10; // 0xa + field public static final int CINEMATIC_EFFECT_STATUS_CONTENT_TARGET_ERROR = 8; // 0x8 + field public static final int CINEMATIC_EFFECT_STATUS_CONTENT_TOO_FLAT = 9; // 0x9 + field public static final int CINEMATIC_EFFECT_STATUS_CONTENT_UNSUPPORTED = 7; // 0x7 field public static final int CINEMATIC_EFFECT_STATUS_ERROR = 0; // 0x0 + field public static final int CINEMATIC_EFFECT_STATUS_FEATURE_DISABLED = 5; // 0x5 + field public static final int CINEMATIC_EFFECT_STATUS_IMAGE_FORMAT_NOT_SUITABLE = 6; // 0x6 field public static final int CINEMATIC_EFFECT_STATUS_NOT_READY = 2; // 0x2 field public static final int CINEMATIC_EFFECT_STATUS_OK = 1; // 0x1 field public static final int CINEMATIC_EFFECT_STATUS_PENDING = 3; // 0x3 diff --git a/core/java/android/app/wallpapereffectsgeneration/CinematicEffectResponse.java b/core/java/android/app/wallpapereffectsgeneration/CinematicEffectResponse.java index b1d2b384a80b4..a9d86a236726b 100644 --- a/core/java/android/app/wallpapereffectsgeneration/CinematicEffectResponse.java +++ b/core/java/android/app/wallpapereffectsgeneration/CinematicEffectResponse.java @@ -43,28 +43,63 @@ public final class CinematicEffectResponse implements Parcelable { CINEMATIC_EFFECT_STATUS_OK, CINEMATIC_EFFECT_STATUS_NOT_READY, CINEMATIC_EFFECT_STATUS_PENDING, - CINEMATIC_EFFECT_STATUS_TOO_MANY_REQUESTS + CINEMATIC_EFFECT_STATUS_TOO_MANY_REQUESTS, + CINEMATIC_EFFECT_STATUS_FEATURE_DISABLED, + CINEMATIC_EFFECT_STATUS_IMAGE_FORMAT_NOT_SUITABLE, + CINEMATIC_EFFECT_STATUS_CONTENT_UNSUPPORTED, + CINEMATIC_EFFECT_STATUS_CONTENT_TARGET_ERROR, + CINEMATIC_EFFECT_STATUS_CONTENT_TOO_FLAT, + CINEMATIC_EFFECT_STATUS_ANIMATION_FAILURE }) @Retention(RetentionPolicy.SOURCE) public @interface CinematicEffectStatusCode {} - /** Cinematic effect generation failure with internal error. */ + /** Cinematic effect generation failure with generic error. */ public static final int CINEMATIC_EFFECT_STATUS_ERROR = 0; /** Cinematic effect generation success. */ public static final int CINEMATIC_EFFECT_STATUS_OK = 1; - /** Service not ready for cinematic effect generation. */ + /** + * Service not ready for cinematic effect generation, e.g. a + * dependency is unavailable. + */ public static final int CINEMATIC_EFFECT_STATUS_NOT_READY = 2; + /** * There is already a task being processed for the same task id. * Client should wait for the response and not send the same request * again. */ public static final int CINEMATIC_EFFECT_STATUS_PENDING = 3; - /** Too many requests for server to handle. */ + + /** Too many requests (with different task id) for server to handle. */ public static final int CINEMATIC_EFFECT_STATUS_TOO_MANY_REQUESTS = 4; + /** Feature is disabled, for example, in an emergency situation. */ + public static final int CINEMATIC_EFFECT_STATUS_FEATURE_DISABLED = 5; + + /** Image format related problems (i.e. resolution or aspect ratio problems). */ + public static final int CINEMATIC_EFFECT_STATUS_IMAGE_FORMAT_NOT_SUITABLE = 6; + + /** + * The cinematic effect feature is not supported on certain types of images, + * for example, some implementation only support portrait. + */ + public static final int CINEMATIC_EFFECT_STATUS_CONTENT_UNSUPPORTED = 7; + + /** + * Cannot generate cinematic effect with the targets on the image, for example, + * too many targets on the image. + */ + public static final int CINEMATIC_EFFECT_STATUS_CONTENT_TARGET_ERROR = 8; + + /** Image is too flat to generate cinematic effect. */ + public static final int CINEMATIC_EFFECT_STATUS_CONTENT_TOO_FLAT = 9; + + /** Something is wrong with generating animation. */ + public static final int CINEMATIC_EFFECT_STATUS_ANIMATION_FAILURE = 10; + /** @hide */ @IntDef(prefix = {"IMAGE_CONTENT_TYPE_"}, value = {IMAGE_CONTENT_TYPE_UNKNOWN,