Loading core/java/android/widget/EditText.java +3 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,9 @@ public class EditText extends TextView { public boolean performAccessibilityActionInternal(int action, Bundle arguments) { switch (action) { case AccessibilityNodeInfo.ACTION_SET_TEXT: { if (!isEnabled()) { return false; } CharSequence text = (arguments != null) ? arguments.getCharSequence( AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE) : null; setText(text); Loading core/java/android/widget/TextView.java +14 −0 Original line number Diff line number Diff line Loading @@ -9094,6 +9094,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (mBufferType == BufferType.EDITABLE) { info.setEditable(true); if (isEnabled()) { info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SET_TEXT); } } if (mEditor != null) { Loading Loading @@ -9225,6 +9228,17 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } } return false; case AccessibilityNodeInfo.ACTION_SET_TEXT: { if (!isEnabled() || (mBufferType != BufferType.EDITABLE)) { return false; } CharSequence text = (arguments != null) ? arguments.getCharSequence( AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE) : null; setText(text); if (text != null && text.length() > 0) { Selection.setSelection((Spannable) mText, text.length()); } } return true; default: { return super.performAccessibilityActionInternal(action, arguments); } Loading Loading
core/java/android/widget/EditText.java +3 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,9 @@ public class EditText extends TextView { public boolean performAccessibilityActionInternal(int action, Bundle arguments) { switch (action) { case AccessibilityNodeInfo.ACTION_SET_TEXT: { if (!isEnabled()) { return false; } CharSequence text = (arguments != null) ? arguments.getCharSequence( AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE) : null; setText(text); Loading
core/java/android/widget/TextView.java +14 −0 Original line number Diff line number Diff line Loading @@ -9094,6 +9094,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (mBufferType == BufferType.EDITABLE) { info.setEditable(true); if (isEnabled()) { info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SET_TEXT); } } if (mEditor != null) { Loading Loading @@ -9225,6 +9228,17 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } } return false; case AccessibilityNodeInfo.ACTION_SET_TEXT: { if (!isEnabled() || (mBufferType != BufferType.EDITABLE)) { return false; } CharSequence text = (arguments != null) ? arguments.getCharSequence( AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE) : null; setText(text); if (text != null && text.length() > 0) { Selection.setSelection((Spannable) mText, text.length()); } } return true; default: { return super.performAccessibilityActionInternal(action, arguments); } Loading