Add more status code to cinematic effect response.
Bug: 213238425
Test: cts
Change-Id: I26dfc53b22817953839d9882398a502ea7293c08
(cherry picked from commit 85d76e06ce)
Merged-In: I26dfc53b22817953839d9882398a502ea7293c08
This commit is contained in:
@@ -2675,7 +2675,13 @@ package android.app.wallpapereffectsgeneration {
|
|||||||
method @NonNull public String getTaskId();
|
method @NonNull public String getTaskId();
|
||||||
method @NonNull public java.util.List<android.app.wallpapereffectsgeneration.TexturedMesh> getTexturedMeshes();
|
method @NonNull public java.util.List<android.app.wallpapereffectsgeneration.TexturedMesh> getTexturedMeshes();
|
||||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
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_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_NOT_READY = 2; // 0x2
|
||||||
field public static final int CINEMATIC_EFFECT_STATUS_OK = 1; // 0x1
|
field public static final int CINEMATIC_EFFECT_STATUS_OK = 1; // 0x1
|
||||||
field public static final int CINEMATIC_EFFECT_STATUS_PENDING = 3; // 0x3
|
field public static final int CINEMATIC_EFFECT_STATUS_PENDING = 3; // 0x3
|
||||||
|
|||||||
@@ -43,28 +43,63 @@ public final class CinematicEffectResponse implements Parcelable {
|
|||||||
CINEMATIC_EFFECT_STATUS_OK,
|
CINEMATIC_EFFECT_STATUS_OK,
|
||||||
CINEMATIC_EFFECT_STATUS_NOT_READY,
|
CINEMATIC_EFFECT_STATUS_NOT_READY,
|
||||||
CINEMATIC_EFFECT_STATUS_PENDING,
|
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)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface CinematicEffectStatusCode {}
|
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;
|
public static final int CINEMATIC_EFFECT_STATUS_ERROR = 0;
|
||||||
|
|
||||||
/** Cinematic effect generation success. */
|
/** Cinematic effect generation success. */
|
||||||
public static final int CINEMATIC_EFFECT_STATUS_OK = 1;
|
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;
|
public static final int CINEMATIC_EFFECT_STATUS_NOT_READY = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* There is already a task being processed for the same task id.
|
* There is already a task being processed for the same task id.
|
||||||
* Client should wait for the response and not send the same request
|
* Client should wait for the response and not send the same request
|
||||||
* again.
|
* again.
|
||||||
*/
|
*/
|
||||||
public static final int CINEMATIC_EFFECT_STATUS_PENDING = 3;
|
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;
|
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 */
|
/** @hide */
|
||||||
@IntDef(prefix = {"IMAGE_CONTENT_TYPE_"},
|
@IntDef(prefix = {"IMAGE_CONTENT_TYPE_"},
|
||||||
value = {IMAGE_CONTENT_TYPE_UNKNOWN,
|
value = {IMAGE_CONTENT_TYPE_UNKNOWN,
|
||||||
|
|||||||
Reference in New Issue
Block a user