summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/ViewRoot.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index ed2139d5f044..47b976bc2f4d 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -1408,8 +1408,8 @@ public final class ViewRoot extends Handler implements ViewParent,
// When in touch mode, focus points to the previously focused view,
// which may have been removed from the view hierarchy. The following
- // line checks whether the view is still in the hierarchy
- if (focus == null || focus.getParent() == null) {
+ // line checks whether the view is still in our hierarchy.
+ if (focus == null || focus.mAttachInfo != mAttachInfo) {
mRealFocusedView = null;
return false;
}