summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chet Haase <chet@google.com> 2013-06-24 16:37:54 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2013-06-24 16:37:55 +0000
commitedaf0794bbeca1adfb825a90a9f42a01bae3aa37 (patch)
tree1d941c03f57d0d2e95f6bb7bc3f3368b6bfbf86e
parentb32a7c7ca2dbdc5cbdc4bee148cd1a8cd7092e24 (diff)
parente4a2d7c48e17dd1c2f59dd18e91997029a6d0bdb (diff)
Merge "Fix ViewGroupOverlay's handling of invalidating viewgroups"
-rw-r--r--core/java/android/view/ViewGroup.java4
-rw-r--r--core/java/android/view/ViewOverlay.java11
2 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index d3f9174b3c5b..a40582b746fc 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -4426,8 +4426,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
/**
* Quick invalidation method that simply transforms the dirty rect into the parent's
* coordinate system, pruning the invalidation if the parent has already been invalidated.
+ *
+ * @hide
*/
- private ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
+ protected ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
if ((mPrivateFlags & PFLAG_DRAWN) == PFLAG_DRAWN ||
(mPrivateFlags & PFLAG_DRAWING_CACHE_VALID) == PFLAG_DRAWING_CACHE_VALID) {
dirty.offset(left - mScrollX, top - mScrollY);
diff --git a/core/java/android/view/ViewOverlay.java b/core/java/android/view/ViewOverlay.java
index 2d86bfe6b4f3..975931ae859c 100644
--- a/core/java/android/view/ViewOverlay.java
+++ b/core/java/android/view/ViewOverlay.java
@@ -300,6 +300,17 @@ public class ViewOverlay {
}
}
+ /**
+ * @hide
+ */
+ @Override
+ protected ViewParent invalidateChildInParentFast(int left, int top, Rect dirty) {
+ if (mHostView instanceof ViewGroup) {
+ return ((ViewGroup) mHostView).invalidateChildInParentFast(left, top, dirty);
+ }
+ return null;
+ }
+
@Override
public ViewParent invalidateChildInParent(int[] location, Rect dirty) {
if (mHostView != null) {