summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRomain Guy <>2009-03-24 21:07:52 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 21:07:52 -0700
commit4087f5425c3799ebd4f3883f4f222ad14f27b3e0 (patch)
treeaad151fd4a3e1b1cc2a8d6a8a4124d3a5b8007b0 /core
parent1711c06dd03abbdab3c3a5d67765f03770d8144b (diff)
downloadframeworks_base-4087f5425c3799ebd4f3883f4f222ad14f27b3e0.zip
frameworks_base-4087f5425c3799ebd4f3883f4f222ad14f27b3e0.tar.gz
frameworks_base-4087f5425c3799ebd4f3883f4f222ad14f27b3e0.tar.bz2
Automated import from //branches/master/...@141886,141886
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/ViewGroup.java8
-rw-r--r--core/java/android/view/ViewRoot.java5
-rw-r--r--core/java/android/view/animation/TranslateAnimation.java1
3 files changed, 9 insertions, 5 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index dc7b299..39aecfd 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -2327,8 +2327,12 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
final boolean drawAnimation = (child.mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION;
do {
- if (drawAnimation && parent instanceof View) {
- ((View) parent).mPrivateFlags |= DRAW_ANIMATION;
+ if (drawAnimation) {
+ if (parent instanceof View) {
+ ((View) parent).mPrivateFlags |= DRAW_ANIMATION;
+ } else if (parent instanceof ViewRoot) {
+ ((ViewRoot) parent).mIsAnimating = true;
+ }
}
parent = parent.invalidateChildInParent(location, dirty);
} while (parent != null);
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index fbb4d42..18ee9ae 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -33,7 +33,6 @@ import android.util.Config;
import android.util.Log;
import android.util.EventLog;
import android.util.SparseArray;
-import android.util.DisplayMetrics;
import android.view.View.MeasureSpec;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
@@ -128,6 +127,7 @@ public final class ViewRoot extends Handler implements ViewParent,
int mWidth;
int mHeight;
Rect mDirty; // will be a graphics.Region soon
+ boolean mIsAnimating;
final View.AttachInfo mAttachInfo;
@@ -1183,7 +1183,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
try {
- if (!dirty.isEmpty()) {
+ if (!dirty.isEmpty() || mIsAnimating) {
long startTime;
if (DEBUG_ORIENTATION || DEBUG_DRAW) {
@@ -1210,6 +1210,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
dirty.setEmpty();
+ mIsAnimating = false;
mAttachInfo.mDrawingTime = SystemClock.uptimeMillis();
canvas.translate(0, -yoff);
mView.mPrivateFlags |= View.DRAWN;
diff --git a/core/java/android/view/animation/TranslateAnimation.java b/core/java/android/view/animation/TranslateAnimation.java
index a785d43..d2ff754 100644
--- a/core/java/android/view/animation/TranslateAnimation.java
+++ b/core/java/android/view/animation/TranslateAnimation.java
@@ -156,7 +156,6 @@ public class TranslateAnimation extends Animation {
if (mFromYDelta != mToYDelta) {
dy = mFromYDelta + ((mToYDelta - mFromYDelta) * interpolatedTime);
}
-
t.getMatrix().setTranslate(dx, dy);
}