summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-04-14 13:21:44 -0700
committerTom Powell <zifnab@zifnab06.net>2017-03-26 16:21:09 -0700
commit51a7d1fa2b802893a36c5abe4e20429dfaddf324 (patch)
tree9772d7281d851bfc45bcc5fea2975a51caf513fb
parentbc210d870e950ac3cb5373b929b0184e0131b22b (diff)
downloadandroid_packages_apps_Trebuchet-51a7d1fa2b802893a36c5abe4e20429dfaddf324.zip
android_packages_apps_Trebuchet-51a7d1fa2b802893a36c5abe4e20429dfaddf324.tar.gz
android_packages_apps_Trebuchet-51a7d1fa2b802893a36c5abe4e20429dfaddf324.tar.bz2
Trebuchet: Always cancel any pending dim animations
Issue-id: CYNGNOS-2470 Change-Id: Id66a6acfa65af63a0c44b73b56769c566b09961c
-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 44790c4..80fc45d 100644
--- a/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java
+++ b/src/com/android/launcher3/BaseRecyclerViewFastScrollBar.java
@@ -133,6 +133,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;
@@ -140,10 +144,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);