diff options
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r-- | core/java/android/view/View.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 6928b2c..3c05872 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -8440,8 +8440,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // If the event should be handled by accessibility focus first. if (event.isTargetAccessibilityFocus()) { // We don't have focus or no virtual descendant has it, do not handle the event. - if (!isAccessibilityFocused() && !(getViewRootImpl() != null && getViewRootImpl() - .getAccessibilityFocusedHost() == this)) { + if (!isAccessibilityFocusedViewOrHost()) { return false; } // We have focus and got the event, then use normal event dispatch. @@ -8490,6 +8489,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return result; } + boolean isAccessibilityFocusedViewOrHost() { + return isAccessibilityFocused() || (getViewRootImpl() != null && getViewRootImpl() + .getAccessibilityFocusedHost() == this); + } + /** * Filter the touch event to apply security policies. * @@ -12872,7 +12876,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Interpolator.Result.FREEZE_END) { cache.state = ScrollabilityCache.OFF; } else { - cache.scrollBar.setAlpha(Math.round(values[0])); + cache.scrollBar.mutate().setAlpha(Math.round(values[0])); } // This will make the scroll bars inval themselves after @@ -12882,7 +12886,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } else { // We're just on -- but we may have been fading before so // reset alpha - cache.scrollBar.setAlpha(255); + cache.scrollBar.mutate().setAlpha(255); } |