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

Commit c71850d2 authored by Taran Singh's avatar Taran Singh
Browse files

Writing tools: selectively enable writing tools in TextView 5/n

Selectively enabled writing tools on TexView attributes that have
inputType of TYPE_CLASS_TEXT and variations that are text and can use
writing tools. This criteria is same as what we use for suggestions in
isSuggestionsEnabled().

Bug: 350047836
Flag: android.view.inputmethod.adaptive_handwriting_bounds
Test: atest CtsInputMethodTestCases TextViewTest
Change-Id: I66b2fbdd947f2e927d98e04e71f70eff796610de
parent f597774c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -10120,6 +10120,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                    outAttrs.extras.putBoolean(
                            STYLUS_HANDWRITING_ENABLED_ANDROIDX_EXTRAS_KEY, handwritingEnabled);
                }
                if (android.view.inputmethod.Flags.writingTools()) {
                    // default to same behavior as isSuggestionsEnabled().
                    outAttrs.setWritingToolsEnabled(isSuggestionsEnabled());
                }
                ArrayList<Class<? extends HandwritingGesture>> gestures = new ArrayList<>();
                gestures.add(SelectGesture.class);
                gestures.add(SelectRangeGesture.class);