diff --git a/core/api/current.txt b/core/api/current.txt index 7ddf0b1c57cc2..19123bba2b5d8 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -54598,14 +54598,6 @@ package android.view.inputmethod { public abstract class HandwritingGesture { method @Nullable public final String getFallbackText(); - field public static final int GESTURE_TYPE_DELETE = 4; // 0x4 - field public static final int GESTURE_TYPE_DELETE_RANGE = 64; // 0x40 - field public static final int GESTURE_TYPE_INSERT = 2; // 0x2 - field public static final int GESTURE_TYPE_JOIN_OR_SPLIT = 16; // 0x10 - field public static final int GESTURE_TYPE_NONE = 0; // 0x0 - field public static final int GESTURE_TYPE_REMOVE_SPACE = 8; // 0x8 - field public static final int GESTURE_TYPE_SELECT = 1; // 0x1 - field public static final int GESTURE_TYPE_SELECT_RANGE = 32; // 0x20 field public static final int GRANULARITY_CHARACTER = 2; // 0x2 field public static final int GRANULARITY_WORD = 1; // 0x1 } diff --git a/core/api/test-current.txt b/core/api/test-current.txt index b459dacae86a3..d25c3f5bf5381 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -3322,6 +3322,14 @@ package android.view.inputmethod { public abstract class HandwritingGesture { method public final int getGestureType(); + field public static final int GESTURE_TYPE_DELETE = 4; // 0x4 + field public static final int GESTURE_TYPE_DELETE_RANGE = 64; // 0x40 + field public static final int GESTURE_TYPE_INSERT = 2; // 0x2 + field public static final int GESTURE_TYPE_JOIN_OR_SPLIT = 16; // 0x10 + field public static final int GESTURE_TYPE_NONE = 0; // 0x0 + field public static final int GESTURE_TYPE_REMOVE_SPACE = 8; // 0x8 + field public static final int GESTURE_TYPE_SELECT = 1; // 0x1 + field public static final int GESTURE_TYPE_SELECT_RANGE = 32; // 0x20 } public final class InlineSuggestion implements android.os.Parcelable { diff --git a/core/java/android/view/inputmethod/HandwritingGesture.java b/core/java/android/view/inputmethod/HandwritingGesture.java index 251626941eeef..e0fc426e14679 100644 --- a/core/java/android/view/inputmethod/HandwritingGesture.java +++ b/core/java/android/view/inputmethod/HandwritingGesture.java @@ -82,38 +82,60 @@ public abstract class HandwritingGesture { @IntDef({GRANULARITY_CHARACTER, GRANULARITY_WORD}) @interface Granularity {} - /** Undefined gesture type. */ + /** + * Undefined gesture type. + * @hide + */ + @TestApi public static final int GESTURE_TYPE_NONE = 0x0000; /** * Gesture of type {@link SelectGesture} to select an area of text. + * @hide */ + @TestApi public static final int GESTURE_TYPE_SELECT = 0x0001; /** * Gesture of type {@link InsertGesture} to insert text at a designated point. + * @hide */ + @TestApi public static final int GESTURE_TYPE_INSERT = 1 << 1; /** * Gesture of type {@link DeleteGesture} to delete an area of text. + * @hide */ + @TestApi public static final int GESTURE_TYPE_DELETE = 1 << 2; - /** Gesture of type {@link RemoveSpaceGesture} to remove whitespace from text. */ + /** + * Gesture of type {@link RemoveSpaceGesture} to remove whitespace from text. + * @hide + */ + @TestApi public static final int GESTURE_TYPE_REMOVE_SPACE = 1 << 3; - /** Gesture of type {@link JoinOrSplitGesture} to join or split text. */ + /** + * Gesture of type {@link JoinOrSplitGesture} to join or split text. + * @hide + */ + @TestApi public static final int GESTURE_TYPE_JOIN_OR_SPLIT = 1 << 4; /** * Gesture of type {@link SelectRangeGesture} to select range of text. + * @hide */ + @TestApi public static final int GESTURE_TYPE_SELECT_RANGE = 1 << 5; /** * Gesture of type {@link DeleteRangeGesture} to delete range of text. + * @hide */ + @TestApi public static final int GESTURE_TYPE_DELETE_RANGE = 1 << 6; /**