From 0a047bdcdd0ea8c58fa80bd4631fe8a8d02df050 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Mon, 4 Jun 2012 19:32:35 -0700 Subject: Accessibility focus should not clear selection when taken away. 1. Currently accessibility focus removal was clearing the selection in the view - in particular the accessibility cursor position which in the TextView case is the selection. This leads to a scenario where the selection may be cleared when the app does not explect. Further, the selection should not be cleared since the user can be say several pages in the content and removing and putting back accessibility focus would cause a tedious traversal to get to the previous position. bug:6469840 Change-Id: Iba3c01600fa2c9c39f99085a5fbc4328aa539ea8 --- core/java/android/view/View.java | 3 --- 1 file changed, 3 deletions(-) (limited to 'core/java/android/view/View.java') diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 9f5613eec86f..83301936b453 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -6279,8 +6279,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal invalidate(); sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED); notifyAccessibilityStateChanged(); - // Clear the text navigation state. - setAccessibilityCursorPosition(ACCESSIBILITY_CURSOR_POSITION_UNDEFINED); } // Clear the global reference of accessibility focus if this // view or any of its descendants had accessibility focus. @@ -6327,7 +6325,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal void clearAccessibilityFocusNoCallbacks() { if ((mPrivateFlags2 & ACCESSIBILITY_FOCUSED) != 0) { mPrivateFlags2 &= ~ACCESSIBILITY_FOCUSED; - setAccessibilityCursorPosition(ACCESSIBILITY_CURSOR_POSITION_UNDEFINED); invalidate(); } } -- cgit v1.2.3