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

Commit a3419bab authored by Jacky Kao's avatar Jacky Kao
Browse files

Providing new accessibilityNode action

Removed this constant variable, TextView.ACCESSIBILITY_ACTION_IME_ENTER,
and added more description for new accessibility action,
ACTION_IME_ENTER.

Bug: 139380257
Test: a11y CTS tests & unit tests
Change-Id: I929262aa0046640aafe36a2dc2a8896ee7cab9ff
parent 808fd231
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -60821,7 +60821,6 @@ package android.widget {
    method public void setTypeface(@Nullable android.graphics.Typeface, int);
    method public void setTypeface(@Nullable android.graphics.Typeface);
    method public void setWidth(int);
    field public static final int ACCESSIBILITY_ACTION_IME_ENTER = 16908372; // 0x1020054
    field public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0; // 0x0
    field public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1; // 0x1
  }
+5 −2
Original line number Diff line number Diff line
@@ -4854,8 +4854,11 @@ public class AccessibilityNodeInfo implements Parcelable {
                new AccessibilityAction(R.id.accessibilityActionPressAndHold);

        /**
         * Action to send ime action. A node should expose this action only for views that are
         * currently with input focus and editable.
         * Action to send an ime action which is from
         * {@link android.view.inputmethod.EditorInfo#actionId}. This action would be
         * {@link android.view.inputmethod.EditorInfo#IME_ACTION_UNSPECIFIED} if no specific
         * actionId defined. A node should expose this action only for views that are currently
         * with input focus and editable.
         */
        @NonNull public static final AccessibilityAction ACTION_IME_ENTER =
                new AccessibilityAction(R.id.accessibilityActionImeEnter);
+2 −5
Original line number Diff line number Diff line
@@ -422,9 +422,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     */
    static final int PROCESS_TEXT_REQUEST_CODE = 100;
    // Accessibility action to send IME custom action for CTS testing.
    public static final int ACCESSIBILITY_ACTION_IME_ENTER = R.id.accessibilityActionImeEnter;
    /**
     *  Return code of {@link #doKeyDown}.
     */
@@ -11758,7 +11755,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                }
                AccessibilityNodeInfo.AccessibilityAction action =
                        new AccessibilityNodeInfo.AccessibilityAction(
                                ACCESSIBILITY_ACTION_IME_ENTER, imeActionLabel);
                                R.id.accessibilityActionImeEnter, imeActionLabel);
                info.addAction(action);
            }
        }
@@ -12072,7 +12069,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                    }
                }
            } return true;
            case ACCESSIBILITY_ACTION_IME_ENTER: {
            case R.id.accessibilityActionImeEnter: {
                if (isFocused() && isTextEditable()) {
                    final int imeActionId = (arguments != null) ? arguments.getInt(
                            AccessibilityNodeInfo.ACTION_ARGUMENT_IME_ACTION_ID_INT,