summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorTracy Zhou <tracyzhou@google.com>2019-01-25 20:36:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-01-25 20:36:23 +0000
commit7eebfc564982bdb64ea34d04f0955647dc40192a (patch)
treec1540c2fd8e1311723bcee19975afe3d035b1d20 /quickstep
parentd182943d3d28a5356dc7a8631e4fb3325a15ed1e (diff)
parentc49f3de3bdf10f6b6523864f3a22a903e96fa27b (diff)
downloadandroid_packages_apps_Trebuchet-7eebfc564982bdb64ea34d04f0955647dc40192a.tar.gz
android_packages_apps_Trebuchet-7eebfc564982bdb64ea34d04f0955647dc40192a.tar.bz2
android_packages_apps_Trebuchet-7eebfc564982bdb64ea34d04f0955647dc40192a.zip
Merge "Make bounce animations less aggressive" into ub-launcher3-master
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/UiFactory.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index ff9d601ef..d295ac5c5 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -21,7 +21,10 @@ import static com.android.launcher3.AbstractFloatingView.TYPE_HIDE_BACK_BUTTON;
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
+import static com.android.launcher3.allapps.DiscoveryBounce.BOUNCE_MAX_COUNT;
+import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_SEEN;
+import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN;
import android.animation.AnimatorSet;
@@ -136,7 +139,8 @@ public class UiFactory {
LauncherState prevState = launcher.getStateManager().getLastState();
if (((swipeUpEnabled && finalState == OVERVIEW) || (!swipeUpEnabled
- && finalState == ALL_APPS && prevState == NORMAL))) {
+ && finalState == ALL_APPS && prevState == NORMAL) || BOUNCE_MAX_COUNT <=
+ launcher.getSharedPrefs().getInt(HOME_BOUNCE_COUNT, 0))) {
launcher.getSharedPrefs().edit().putBoolean(HOME_BOUNCE_SEEN, true).apply();
launcher.getStateManager().removeStateListener(this);
}
@@ -159,7 +163,8 @@ public class UiFactory {
public void onStateTransitionComplete(LauncherState finalState) {
LauncherState prevState = launcher.getStateManager().getLastState();
- if (finalState == ALL_APPS && prevState == OVERVIEW) {
+ if ((finalState == ALL_APPS && prevState == OVERVIEW) || BOUNCE_MAX_COUNT <=
+ launcher.getSharedPrefs().getInt(SHELF_BOUNCE_COUNT, 0)) {
launcher.getSharedPrefs().edit().putBoolean(SHELF_BOUNCE_SEEN, true).apply();
launcher.getStateManager().removeStateListener(this);
}