This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
shell/platform/android/io/flutter/view Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -635,8 +635,7 @@ public AccessibilityNodeInfo createAccessibilityNodeInfo(int virtualViewId) {
635635 }
636636
637637 // These are non-ops on older devices. Attempting to interact with the text will cause Talkback
638- // to read the
639- // contents of the text box instead.
638+ // to read the contents of the text box instead.
640639 if (Build .VERSION .SDK_INT > Build .VERSION_CODES .JELLY_BEAN_MR2 ) {
641640 if (semanticsNode .hasAction (Action .SET_SELECTION )) {
642641 result .addAction (AccessibilityNodeInfo .ACTION_SET_SELECTION );
@@ -652,6 +651,14 @@ public AccessibilityNodeInfo createAccessibilityNodeInfo(int virtualViewId) {
652651 }
653652 }
654653
654+ // Set text APIs aren't available until API 21.
655+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .LOLLIPOP ) {
656+ if (semanticsNode .hasAction (Action .SET_TEXT )) {
657+ Log .e (TAG , "add action yo" );
658+ result .addAction (AccessibilityNodeInfo .ACTION_SET_TEXT );
659+ }
660+ }
661+
655662 if (semanticsNode .hasFlag (Flag .IS_BUTTON ) || semanticsNode .hasFlag (Flag .IS_LINK )) {
656663 result .setClassName ("android.widget.Button" );
657664 }
You can’t perform that action at this time.
0 commit comments