Fix issue with views becoming visible with stale content.
An earlier fix nooop'd invalidate calls on non-visible views. This
caused an issue where changes to the view while it was not visible
(such as changing the text of a TextView) would not get picked up
by the invalidation process.
The fix is to automatically invalidate() a view when it becomes
visible, to account for any changes that may have occurred to its
content while it was not visible.
Change-Id: Ia0f8fb42ca627b5a38f08761fa622b23f2dfa38b
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 17e637c..e97d88f 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6433,10 +6433,10 @@
if ((flags & VISIBILITY_MASK) == VISIBLE) {
if ((changed & VISIBILITY_MASK) != 0) {
/*
- * If this view is becoming visible, set the DRAWN flag so that
- * the next invalidate() will not be skipped.
+ * If this view is becoming visible, invalidate it in case it changed while
+ * it was not visible.
*/
- mPrivateFlags |= DRAWN;
+ invalidate(true);
needGlobalAttributesUpdate(true);