From 1b7f8f99c31d49904d8522baf435b94c96e1d85c Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Tue, 30 Jun 2015 15:31:10 -0700 Subject: [PATCH] Invalidate parent when scrolling child view back onto screen This bug caused views which used to be quick-rejected to continue to not be drawn because the parent's DisplayList no longer contained them. The fix is to notice when offsetting a view puts it back on screen and invalidates the parent appropriately. Issue #21413554 offsetTopAndBottom requires invalidating parent when view becomes visible again Change-Id: I0f5d2cc48e3da912a41635712d9c37fb30e70c86 --- 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 23da6d25030af..63dd4926bc569 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -12288,6 +12288,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mRenderNode.offsetTopAndBottom(offset); if (isHardwareAccelerated()) { invalidateViewProperty(false, false); + invalidateParentIfNeededAndWasQuickRejected(); } else { if (!matrixIsIdentity) { invalidateViewProperty(false, true); @@ -12335,6 +12336,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mRenderNode.offsetLeftAndRight(offset); if (isHardwareAccelerated()) { invalidateViewProperty(false, false); + invalidateParentIfNeededAndWasQuickRejected(); } else { if (!matrixIsIdentity) { invalidateViewProperty(false, true);