summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-04-14 13:21:44 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-04-14 13:29:02 -0700
commitc14b40481da9dfd861362c97cbc11f3fd3b26622 (patch)
treeca5e1076df5931a0c242781b60a42e2741dd6139 /src/com
parent95d19347d6f6f20658f29286c7e3ce81e97d9b97 (diff)
downloadandroid_packages_apps_Trebuchet-c14b40481da9dfd861362c97cbc11f3fd3b26622.zip
android_packages_apps_Trebuchet-c14b40481da9dfd861362c97cbc11f3fd3b26622.tar.gz
android_packages_apps_Trebuchet-c14b40481da9dfd861362c97cbc11f3fd3b26622.tar.bz2
Trebuchet: Always cancel any pending dim animations
Issue-id: CYNGNOS-2470 Change-Id: Id66a6acfa65af63a0c44b73b56769c566b09961c
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java b/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java
index 006cfcc..5aa30cc 100644
--- a/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java
+++ b/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java
@@ -140,6 +140,10 @@ public class BaseRecyclerViewFastScrollBar {
if ((mFastScrollMode & FAST_SCROLL_FOCUS_DIMMABLE) == 0) {
return;
}
+ // Clean up the previous dim animator
+ if (mFastScrollDimAnimator != null) {
+ mFastScrollDimAnimator.cancel();
+ }
if (!animated) {
mFastScrollDimmed = dimmed;
@@ -147,10 +151,6 @@ public class BaseRecyclerViewFastScrollBar {
} else if (mFastScrollDimmed != dimmed) {
mFastScrollDimmed = dimmed;
- // Clean up the previous dim animator
- if (mFastScrollDimAnimator != null) {
- mFastScrollDimAnimator.cancel();
- }
mFastScrollDimAnimator = ObjectAnimator.ofFloat(mView, View.ALPHA, dimmed ? 0.4f : 1f);
mFastScrollDimAnimator.setDuration(dimmed ?
FAST_SCROLL_FOCUS_FADE_IN_DURATION : FAST_SCROLL_FOCUS_FADE_OUT_DURATION);