diff options
author | Chet Haase <chet@google.com> | 2013-10-04 16:34:14 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-04 16:34:14 -0700 |
commit | 5c44b36b2a5f44bdba53244ee423aeeea14c485e (patch) | |
tree | 8cc6ebceb87fee874a0228bc7f320069565a4607 /core | |
parent | 3afc7f15c66563c7c966ff44f2a385779678e547 (diff) | |
parent | 3980ae478b290bc472f20289b67b6719439b12fa (diff) | |
download | frameworks_base-5c44b36b2a5f44bdba53244ee423aeeea14c485e.zip frameworks_base-5c44b36b2a5f44bdba53244ee423aeeea14c485e.tar.gz frameworks_base-5c44b36b2a5f44bdba53244ee423aeeea14c485e.tar.bz2 |
am 3980ae47: am 845d9192: Merge "Enable transitions in lockscreen media controller" into klp-dev
* commit '3980ae478b290bc472f20289b67b6719439b12fa':
Enable transitions in lockscreen media controller
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/transition/ChangeText.java | 7 | ||||
-rw-r--r-- | core/java/android/transition/TransitionManager.java | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/core/java/android/transition/ChangeText.java b/core/java/android/transition/ChangeText.java index b1be70f..8677a56 100644 --- a/core/java/android/transition/ChangeText.java +++ b/core/java/android/transition/ChangeText.java @@ -179,8 +179,8 @@ public class ChangeText extends Transition { startSelectionStart = startSelectionEnd = endSelectionStart = endSelectionEnd = -1; } if (!startText.equals(endText)) { - final int startColor = (Integer) startVals.get(PROPNAME_TEXT_COLOR); - final int endColor = (Integer) endVals.get(PROPNAME_TEXT_COLOR); + final int startColor; + final int endColor; if (mChangeBehavior != CHANGE_BEHAVIOR_IN) { view.setText(startText); if (view instanceof EditText) { @@ -189,6 +189,7 @@ public class ChangeText extends Transition { } Animator anim; if (mChangeBehavior == CHANGE_BEHAVIOR_KEEP) { + startColor = endColor = 0; anim = ValueAnimator.ofFloat(0, 1); anim.addListener(new AnimatorListenerAdapter() { @Override @@ -203,6 +204,8 @@ public class ChangeText extends Transition { } }); } else { + startColor = (Integer) startVals.get(PROPNAME_TEXT_COLOR); + endColor = (Integer) endVals.get(PROPNAME_TEXT_COLOR); // Fade out start text ValueAnimator outAnim = null, inAnim = null; if (mChangeBehavior == CHANGE_BEHAVIOR_OUT_IN || diff --git a/core/java/android/transition/TransitionManager.java b/core/java/android/transition/TransitionManager.java index 9be91d0..404709c 100644 --- a/core/java/android/transition/TransitionManager.java +++ b/core/java/android/transition/TransitionManager.java @@ -240,12 +240,7 @@ public class TransitionManager { } transition.playTransition(sceneRoot); - // Returning false from onPreDraw() skips the current frame. This is - // necessary to avoid artifacts caused by resetting target views - // to their proper end states for capturing. Waiting until the next - // frame to draw allows these views to have their mid-transition - // values set on them again and avoid artifacts. - return false; + return true; } }; observer.addOnPreDrawListener(listener); |