Skip to content

Commit f406286

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "Accessibility focus and input focus do not sync - part 2" into jb-dev
2 parents 493743e + 525ae20 commit f406286

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

core/java/android/view/View.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6212,15 +6212,6 @@ public void clearAccessibilityFocus() {
62126212

62136213
// Clear the text navigation state.
62146214
setAccessibilityCursorPosition(-1);
6215-
6216-
// Try to move accessibility focus to the input focus.
6217-
View rootView = getRootView();
6218-
if (rootView != null) {
6219-
View inputFocus = rootView.findFocus();
6220-
if (inputFocus != null) {
6221-
inputFocus.requestAccessibilityFocus();
6222-
}
6223-
}
62246215
}
62256216
}
62266217

core/java/android/view/ViewRootImpl.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,20 +2895,6 @@ public void handleMessage(Message msg) {
28952895
if (hasWindowFocus) {
28962896
mView.sendAccessibilityEvent(
28972897
AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
2898-
// Give accessibility focus to the view that has input
2899-
// focus if such, otherwise to the first one.
2900-
if (mView instanceof ViewGroup) {
2901-
ViewGroup viewGroup = (ViewGroup) mView;
2902-
View focused = viewGroup.findFocus();
2903-
if (focused != null) {
2904-
focused.requestAccessibilityFocus();
2905-
}
2906-
}
2907-
// There is no accessibility focus, despite our effort
2908-
// above, now just give it to the first view.
2909-
if (mAccessibilityFocusedHost == null) {
2910-
mView.requestAccessibilityFocus();
2911-
}
29122898
}
29132899
}
29142900
}

0 commit comments

Comments
 (0)