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

Commit b87faf02 authored by Taran Singh's avatar Taran Singh Committed by Android (Google) Code Review
Browse files

Merge "Introduce Scribe gesture: InsertModeGesture"

parents aa8ef2bc a23e49af
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -55038,6 +55038,22 @@ package android.view.inputmethod {
    method @NonNull public android.view.inputmethod.InsertGesture.Builder setTextToInsert(@NonNull String);
  }
  public final class InsertModeGesture extends android.view.inputmethod.HandwritingGesture implements android.os.Parcelable {
    method public int describeContents();
    method @NonNull public android.os.CancellationSignal getCancellationSignal();
    method @NonNull public android.graphics.PointF getInsertionPoint();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.view.inputmethod.InsertModeGesture> CREATOR;
  }
  public static final class InsertModeGesture.Builder {
    ctor public InsertModeGesture.Builder();
    method @NonNull public android.view.inputmethod.InsertModeGesture build();
    method @NonNull public android.view.inputmethod.InsertModeGesture.Builder setCancellationSignal(@NonNull android.os.CancellationSignal);
    method @NonNull public android.view.inputmethod.InsertModeGesture.Builder setFallbackText(@Nullable String);
    method @NonNull public android.view.inputmethod.InsertModeGesture.Builder setInsertionPoint(@NonNull android.graphics.PointF);
  }
  public final class JoinOrSplitGesture extends android.view.inputmethod.HandwritingGesture implements android.os.Parcelable {
    method public int describeContents();
    method @NonNull public android.graphics.PointF getJoinOrSplitPoint();
+1 −0
Original line number Diff line number Diff line
@@ -3335,6 +3335,7 @@ package android.view.inputmethod {
    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_INSERT_MODE = 128; // 0x80
    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
+6 −0
Original line number Diff line number Diff line
@@ -568,6 +568,8 @@ public class EditorInfo implements InputType, Parcelable {
                supportedTypes |= HandwritingGesture.GESTURE_TYPE_SELECT_RANGE;
            } else if (gesture.equals(InsertGesture.class)) {
                supportedTypes |= HandwritingGesture.GESTURE_TYPE_INSERT;
            } else if (gesture.equals(InsertModeGesture.class)) {
                supportedTypes |= HandwritingGesture.GESTURE_TYPE_INSERT_MODE;
            } else if (gesture.equals(DeleteGesture.class)) {
                supportedTypes |= HandwritingGesture.GESTURE_TYPE_DELETE;
            } else if (gesture.equals(DeleteRangeGesture.class)) {
@@ -611,6 +613,10 @@ public class EditorInfo implements InputType, Parcelable {
                == HandwritingGesture.GESTURE_TYPE_INSERT) {
            list.add(InsertGesture.class);
        }
        if ((mSupportedHandwritingGestureTypes & HandwritingGesture.GESTURE_TYPE_INSERT_MODE)
                == HandwritingGesture.GESTURE_TYPE_INSERT_MODE) {
            list.add(InsertModeGesture.class);
        }
        if ((mSupportedHandwritingGestureTypes & HandwritingGesture.GESTURE_TYPE_DELETE)
                == HandwritingGesture.GESTURE_TYPE_DELETE) {
            list.add(DeleteGesture.class);
+9 −0
Original line number Diff line number Diff line
@@ -141,6 +141,13 @@ public abstract class HandwritingGesture {
    @TestApi
    public static final int GESTURE_TYPE_DELETE_RANGE = 1 << 6;

    /**
     * Gesture of type {@link InsertModeGesture} to begin an insert mode at a designated point.
     * @hide
     */
    @TestApi
    public static final int GESTURE_TYPE_INSERT_MODE = 1 << 7;

    /**
     * Type of gesture like {@link #GESTURE_TYPE_SELECT}, {@link #GESTURE_TYPE_INSERT},
     * or {@link #GESTURE_TYPE_DELETE}.
@@ -150,6 +157,7 @@ public abstract class HandwritingGesture {
            GESTURE_TYPE_SELECT,
            GESTURE_TYPE_SELECT_RANGE,
            GESTURE_TYPE_INSERT,
            GESTURE_TYPE_INSERT_MODE,
            GESTURE_TYPE_DELETE,
            GESTURE_TYPE_DELETE_RANGE,
            GESTURE_TYPE_REMOVE_SPACE,
@@ -168,6 +176,7 @@ public abstract class HandwritingGesture {
            GESTURE_TYPE_SELECT,
            GESTURE_TYPE_SELECT_RANGE,
            GESTURE_TYPE_INSERT,
            GESTURE_TYPE_INSERT_MODE,
            GESTURE_TYPE_DELETE,
            GESTURE_TYPE_DELETE_RANGE,
            GESTURE_TYPE_REMOVE_SPACE,
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.view.inputmethod;

parcelable InsertModeGesture;
 No newline at end of file
Loading