diff --git a/res/animator-v23/discovery_bounce.xml b/res/animator-v23/discovery_bounce.xml
new file mode 100644
index 0000000000..8d0e8fdfb5
--- /dev/null
+++ b/res/animator-v23/discovery_bounce.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/anim/discovery_bounce.xml b/res/animator/discovery_bounce.xml
similarity index 54%
rename from res/anim/discovery_bounce.xml
rename to res/animator/discovery_bounce.xml
index 1f7d466189..f02ebdbace 100644
--- a/res/anim/discovery_bounce.xml
+++ b/res/animator/discovery_bounce.xml
@@ -1,7 +1,7 @@
-
-
+ android:ordering="sequentially">
+ android:valueTo="0.9438f"
+ android:valueType="floatType" />
-
+ android:valueType="floatType" />
diff --git a/res/interpolator/disco_bounce_section1.xml b/res/interpolator/disco_bounce.xml
similarity index 81%
rename from res/interpolator/disco_bounce_section1.xml
rename to res/interpolator/disco_bounce.xml
index 21562165cf..6ec339ea1c 100644
--- a/res/interpolator/disco_bounce_section1.xml
+++ b/res/interpolator/disco_bounce.xml
@@ -16,7 +16,7 @@
-->
+ android:controlX1="0.35"
+ android:controlY1="0"
+ android:controlX2="0.5"
+ android:controlY2="1" />
diff --git a/res/interpolator/disco_bounce_section2.xml b/res/interpolator/disco_bounce_section2.xml
deleted file mode 100644
index 86cc789fe2..0000000000
--- a/res/interpolator/disco_bounce_section2.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
diff --git a/res/interpolator/disco_bounce_section3.xml b/res/interpolator/disco_bounce_section3.xml
deleted file mode 100644
index 1acef037cb..0000000000
--- a/res/interpolator/disco_bounce_section3.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 614d08669e..60d2e81f3f 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -272,7 +272,6 @@ public class Launcher extends BaseActivity
private IconCache mIconCache;
private LauncherAccessibilityDelegate mAccessibilityDelegate;
private final Handler mHandler = new Handler();
- private boolean mIsResumeFromActionScreenOff;
private boolean mHasFocus = false;
private ObjectAnimator mScrimAnimator;
@@ -1046,7 +1045,6 @@ public class Launcher extends BaseActivity
if (shouldShowDiscoveryBounce()) {
mAllAppsController.showDiscoveryBounce();
}
- mIsResumeFromActionScreenOff = false;
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onResume();
}
@@ -1548,7 +1546,6 @@ public class Launcher extends BaseActivity
mAppsView.reset();
}
}
- mIsResumeFromActionScreenOff = true;
mShouldFadeInScrim = true;
} else if (Intent.ACTION_USER_PRESENT.equals(action)) {
// ACTION_USER_PRESENT is sent after onStart/onResume. This covers the case where
@@ -3910,16 +3907,7 @@ public class Launcher extends BaseActivity
}
private boolean shouldShowDiscoveryBounce() {
- if (mState != State.WORKSPACE) {
- return false;
- }
- if (mLauncherCallbacks != null && mLauncherCallbacks.shouldShowDiscoveryBounce()) {
- return true;
- }
- if (!mIsResumeFromActionScreenOff) {
- return false;
- }
- return !mSharedPrefs.getBoolean(APPS_VIEW_SHOWN, false);
+ return mState == State.WORKSPACE && !mSharedPrefs.getBoolean(APPS_VIEW_SHOWN, false);
}
protected void moveWorkspaceToDefaultScreen() {
diff --git a/src/com/android/launcher3/LauncherCallbacks.java b/src/com/android/launcher3/LauncherCallbacks.java
index c900e533b2..66da046ef8 100644
--- a/src/com/android/launcher3/LauncherCallbacks.java
+++ b/src/com/android/launcher3/LauncherCallbacks.java
@@ -95,6 +95,4 @@ public interface LauncherCallbacks {
int SEARCH_BAR_HEIGHT_NORMAL = 0, SEARCH_BAR_HEIGHT_TALL = 1;
/** Must return one of {@link #SEARCH_BAR_HEIGHT_NORMAL} or {@link #SEARCH_BAR_HEIGHT_TALL} */
int getSearchBarHeight();
-
- boolean shouldShowDiscoveryBounce();
}
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index a1f2dd7e31..743b16ef19 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -99,7 +99,7 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
// Used in discovery bounce animation to provide the transition without workspace changing.
private boolean mIsTranslateWithoutWorkspace = false;
- private AnimatorSet mDiscoBounceAnimation;
+ private Animator mDiscoBounceAnimation;
private GradientView mGradientView;
private SpringAnimation mSearchSpring;
@@ -421,8 +421,8 @@ public class AllAppsTransitionController implements TouchController, SwipeDetect
cancelDiscoveryAnimation();
// assumption is that this variable is always null
- mDiscoBounceAnimation = (AnimatorSet) AnimatorInflater.loadAnimator(mLauncher,
- R.anim.discovery_bounce);
+ mDiscoBounceAnimation = AnimatorInflater.loadAnimator(mLauncher,
+ R.animator.discovery_bounce);
mDiscoBounceAnimation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animator) {
diff --git a/src/com/android/launcher3/testing/LauncherExtension.java b/src/com/android/launcher3/testing/LauncherExtension.java
index e5842fa0af..5cb8c4c7d5 100644
--- a/src/com/android/launcher3/testing/LauncherExtension.java
+++ b/src/com/android/launcher3/testing/LauncherExtension.java
@@ -215,10 +215,5 @@ public class LauncherExtension extends Launcher {
@Override
public void onDetachedFromWindow() {
}
-
- @Override
- public boolean shouldShowDiscoveryBounce() {
- return false;
- }
}
}