From e4e6e206959560a420a765aac576a8da5ec91dbd Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Mon, 29 Aug 2011 14:34:30 -0700 Subject: [PATCH] Fixed bug with invalidation in top-level Views. There was a bug in an InputMethod app, where popups for the keys would not pop-down again. The problem was that they were being marked INVISIBLE, but the new invalidation logic noop'd the invalidate() call that used to take place. Adding to that was logic in setFlags() that only invalidated a parent for parents that are instanceof ViewGroup. In this case, the parent is a ViewRootImpl. Fix is to call invalidateChild() on the parent if it's not a ViewGroup. Change-Id: I2c2352072d383cee1367ea7ee6c2207077721fd5 --- core/java/android/view/View.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 7713bd87d0c88..14677e115485d 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -6497,6 +6497,8 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit if (mParent instanceof ViewGroup) { ((ViewGroup) mParent).onChildVisibilityChanged(this, (flags & VISIBILITY_MASK)); ((View) mParent).invalidate(true); + } else if (mParent != null) { + mParent.invalidateChild(this, null); } dispatchVisibilityChanged(this, (flags & VISIBILITY_MASK)); }