diff options
author | Raj Yengisetty <rajesh@cyngn.com> | 2014-08-07 16:09:24 -0700 |
---|---|---|
committer | Rajesh Yengisetty <rajesh@cyngn.com> | 2014-08-14 18:16:27 +0000 |
commit | 277cfe5d91b4594ba3155d0d2917b9d20b7d3684 (patch) | |
tree | 8126a77fa28e0a669669014a9a2fd77554baad93 /src/com/android/launcher3/LauncherViewPropertyAnimator.java | |
parent | cddb4bbc70ee010d5e95d7a43600ff8e6458eb4d (diff) | |
download | android_packages_apps_Trebuchet-277cfe5d91b4594ba3155d0d2917b9d20b7d3684.tar.gz android_packages_apps_Trebuchet-277cfe5d91b4594ba3155d0d2917b9d20b7d3684.tar.bz2 android_packages_apps_Trebuchet-277cfe5d91b4594ba3155d0d2917b9d20b7d3684.zip |
Fix for shadow folders.
Repro:
- Set low animation scale (.3-.5)
- Pkill Trebuchet
- Open home screen and click open folder with ~12+
https://jira.cyanogenmod.org/browse/CYAN-4907
Change-Id: Ib927101e72674d5ffa3733f5c093c3f9970fa273
Diffstat (limited to 'src/com/android/launcher3/LauncherViewPropertyAnimator.java')
-rw-r--r-- | src/com/android/launcher3/LauncherViewPropertyAnimator.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/launcher3/LauncherViewPropertyAnimator.java b/src/com/android/launcher3/LauncherViewPropertyAnimator.java index 4cafbbfa6..63b87be5f 100644 --- a/src/com/android/launcher3/LauncherViewPropertyAnimator.java +++ b/src/com/android/launcher3/LauncherViewPropertyAnimator.java @@ -127,7 +127,9 @@ public class LauncherViewPropertyAnimator extends Animator implements AnimatorLi public void onAnimationStart(Animator animation) { // This is the first time we get a handle to the internal ValueAnimator // used by the ViewPropertyAnimator. - mFirstFrameHelper.onAnimationStart(animation); + if (mFirstFrameHelper != null) { + mFirstFrameHelper.onAnimationStart(animation); + } for (int i = 0; i < mListeners.size(); i++) { Animator.AnimatorListener listener = mListeners.get(i); @@ -195,7 +197,12 @@ public class LauncherViewPropertyAnimator extends Animator implements AnimatorLi // FirstFrameAnimatorHelper hooks itself up to the updates on the animator, // and then adjusts the play time to keep the first two frames jank-free - mFirstFrameHelper = new FirstFrameAnimatorHelper(mViewPropertyAnimator, mTarget); + // HOWEVER, If the animation scale is less than 1f the FirstFrameAnimatorHelper sometimes + // causes the animation to not finish (e.g. opening a Folder will result in the Folder + // View's alpha being stuck somewhere between 0-1f. + if (Launcher.isAnimatorScaleSafe()) { + mFirstFrameHelper = new FirstFrameAnimatorHelper(mViewPropertyAnimator, mTarget); + } if (mPropertiesToSet.contains(Properties.TRANSLATION_X)) { mViewPropertyAnimator.translationX(mTranslationX); |