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

Commit 640881fc authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make setStylusHandwritingRegion param immutable" into main

parents 4132294e 7741b31c
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -3202,7 +3202,8 @@ public class InputMethodService extends AbstractInputMethodService {
     */
    @FlaggedApi(Flags.FLAG_ADAPTIVE_HANDWRITING_BOUNDS)
    public final void setStylusHandwritingRegion(@NonNull Region handwritingRegion) {
        if (handwritingRegion.equals(mLastHandwritingRegion)) {
        final Region immutableHandwritingRegion = new Region(handwritingRegion);
        if (immutableHandwritingRegion.equals(mLastHandwritingRegion)) {
            Log.v(TAG, "Failed to set setStylusHandwritingRegion():"
                    + " same region set twice.");
            return;
@@ -3210,10 +3211,10 @@ public class InputMethodService extends AbstractInputMethodService {

        if (DEBUG) {
            Log.d(TAG, "Setting new handwriting region for stylus handwriting "
                    + handwritingRegion + " from last " + mLastHandwritingRegion);
                    + immutableHandwritingRegion + " from last " + mLastHandwritingRegion);
        }
        mPrivOps.setHandwritingTouchableRegion(handwritingRegion);
        mLastHandwritingRegion = handwritingRegion;
        mPrivOps.setHandwritingTouchableRegion(immutableHandwritingRegion);
        mLastHandwritingRegion = immutableHandwritingRegion;
    }

    /**