summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-04-14 13:21:44 -0700
committerEd Carrigan <cretin45@gmail.com>2016-04-14 13:29:19 -0700
commite9a3f71cad9a881233a1148c4897f958d81217e0 (patch)
tree2e4f4a298419d53b6f696d587dd7df434923ab7b
parent5d0b36eb6c2697cb8325a4343bc5eca0246a3162 (diff)
downloadandroid_packages_apps_Trebuchet-e9a3f71cad9a881233a1148c4897f958d81217e0.zip
android_packages_apps_Trebuchet-e9a3f71cad9a881233a1148c4897f958d81217e0.tar.gz
android_packages_apps_Trebuchet-e9a3f71cad9a881233a1148c4897f958d81217e0.tar.bz2
Trebuchet: Always cancel any pending dim animations
Issue-id: CYNGNOS-2470 Change-Id: Id66a6acfa65af63a0c44b73b56769c566b09961c (cherry picked from commit c14b40481da9dfd861362c97cbc11f3fd3b26622)
-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);