summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/View.java
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-02-06 23:58:49 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-06 23:58:49 +0000
commit763ce6c0c48416a67a36919d1b7ac67d6b73c430 (patch)
tree27a594da14697f3497f69d6c4dc2e687f3ad3e8a /core/java/android/view/View.java
parenta7404dbde991d36353440546ff8c92e44d218dfe (diff)
parent41daba0052f4a9146aad4977da9eccf3c72450ce (diff)
downloadframeworks_base-763ce6c0c48416a67a36919d1b7ac67d6b73c430.zip
frameworks_base-763ce6c0c48416a67a36919d1b7ac67d6b73c430.tar.gz
frameworks_base-763ce6c0c48416a67a36919d1b7ac67d6b73c430.tar.bz2
am 41daba00: am 060bca74: Merge "Accessibility: Handle a missed case when clicking focused views." into lmp-mr1-dev
* commit '41daba0052f4a9146aad4977da9eccf3c72450ce': Accessibility: Handle a missed case when clicking focused views.
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r--core/java/android/view/View.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index e4a8978..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.
*