summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-04-17 15:37:48 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-17 15:37:48 -0700
commit06fd472390126c74977ce9a0b2f912e91ebf2744 (patch)
treed703d7181481cd12b6044e9397b300acc443d425 /core/java/android
parentc5cbcb51baaf2e9e61f3bdbd5ef97a05aac25010 (diff)
parent09dd116cd39613a3736dbbf028544e1655002430 (diff)
downloadframeworks_base-06fd472390126c74977ce9a0b2f912e91ebf2744.zip
frameworks_base-06fd472390126c74977ce9a0b2f912e91ebf2744.tar.gz
frameworks_base-06fd472390126c74977ce9a0b2f912e91ebf2744.tar.bz2
Merge "Fix a bug with enterTouchMode removing focus"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/ViewRootImpl.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index b4554d5..1472993 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -2977,7 +2977,10 @@ public final class ViewRootImpl implements ViewParent,
// be when the window is first being added, and mFocused isn't
// set yet.
final View focused = mView.findFocus();
- if (focused != null && !focused.isFocusableInTouchMode()) {
+ if (focused != null) {
+ if (focused.isFocusableInTouchMode()) {
+ return true;
+ }
final ViewGroup ancestorToTakeFocus =
findAncestorToTakeFocusInTouchMode(focused);
if (ancestorToTakeFocus != null) {