diff options
author | John Reck <jreck@google.com> | 2014-09-05 15:57:47 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-09-05 15:58:26 -0700 |
commit | f5945a0c8bb868f978d9d0d22043a8b44464a86e (patch) | |
tree | 225f4979dc6b8e0290307194fa1ec0c3a48ddcff /tests/HwAccelerationTest/src | |
parent | c237555c6cb89c347acf13eba45b875946473501 (diff) |
Disable RT-anim for AnimatorSet
Bug: 17317184
Unfortunately this will disable *all* RT animations in a scene,
but we don't have more selective targetting currently
Change-Id: I57e1c0ae43957f45229473bdcdaf34c05825fab7
Diffstat (limited to 'tests/HwAccelerationTest/src')
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java index 3360e3036205..256a1d4c2dcc 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java @@ -17,6 +17,7 @@ package com.android.test.hwui; import android.animation.Animator; +import android.animation.AnimatorSet; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; @@ -34,6 +35,7 @@ public class RevealActivity extends Activity implements OnClickListener { private static final int DURATION = 800; private boolean mShouldBlock; + private int mIteration = 0; @Override protected void onCreate(Bundle savedInstanceState) { @@ -57,10 +59,17 @@ public class RevealActivity extends Activity implements OnClickListener { Animator animator = ViewAnimationUtils.createCircularReveal(view, view.getWidth() / 2, view.getHeight() / 2, 0, Math.max(view.getWidth(), view.getHeight())); - animator.setDuration(DURATION); - animator.setAllowRunningAsynchronously(true); - animator.start(); + if (mIteration < 2) { + animator.setDuration(DURATION); + animator.start(); + } else { + AnimatorSet set = new AnimatorSet(); + set.playTogether(animator); + set.setDuration(DURATION); + set.start(); + } + mIteration = (mIteration + 1) % 4; mShouldBlock = !mShouldBlock; if (mShouldBlock) { view.post(sBlockThread); |