summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherStateTransitionAnimation.java
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2015-09-25 16:12:35 -0700
committerWinson Chung <winsonc@google.com>2015-09-25 23:21:00 +0000
commitf768d934682ba80da89d454543928e629a44103d (patch)
tree695f82dee36c0f41d64c031f92ca20b25248de49 /src/com/android/launcher3/LauncherStateTransitionAnimation.java
parent17e2d49547eb8d068b1ba816c6226cf5ef77369d (diff)
downloadandroid_packages_apps_Trebuchet-f768d934682ba80da89d454543928e629a44103d.tar.gz
android_packages_apps_Trebuchet-f768d934682ba80da89d454543928e629a44103d.tar.bz2
android_packages_apps_Trebuchet-f768d934682ba80da89d454543928e629a44103d.zip
Fixing regression in L3 with search bar transition.
Change-Id: Ia4155a653012c5d23df21167233fe766e5479347
Diffstat (limited to 'src/com/android/launcher3/LauncherStateTransitionAnimation.java')
-rw-r--r--src/com/android/launcher3/LauncherStateTransitionAnimation.java39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java
index cdde8c13f..5b8af9758 100644
--- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java
+++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java
@@ -710,26 +710,27 @@ public class LauncherStateTransitionAnimation {
toWorkspaceState.getSearchDropTargetBarState();
if (overlaySearchBar != null) {
- if ((toWorkspaceState == Workspace.State.NORMAL) &&
- (fromWorkspaceState == Workspace.State.NORMAL_HIDDEN)) {
- // If we are transitioning from the overlay to the workspace, then show the
- // workspace search bar immediately and let the overlay search bar fade out on top
- mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, 0);
- } else if (fromWorkspaceState == Workspace.State.NORMAL) {
- // If we are transitioning from the workspace to the overlay, then keep the
- // workspace search bar visible until the overlay search bar fades in on top
- animation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, 0);
- }
- });
- } else {
- // Otherwise, then just animate the workspace search bar normally
- mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, duration);
+ if (mLauncher.launcherCallbacksProvidesSearch()) {
+ if ((toWorkspaceState == Workspace.State.NORMAL) &&
+ (fromWorkspaceState == Workspace.State.NORMAL_HIDDEN)) {
+ // If we are transitioning from the overlay to the workspace, then show the
+ // workspace search bar immediately and let the overlay search bar fade out on
+ // top
+ mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, 0);
+ return;
+ } else if (fromWorkspaceState == Workspace.State.NORMAL) {
+ // If we are transitioning from the workspace to the overlay, then keep the
+ // workspace search bar visible until the overlay search bar fades in on top
+ animation.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, 0);
+ }
+ });
+ return;
+ }
}
- } else {
- // If there is no overlay search bar, then just animate the workspace search bar
+ // Fallback to the default search bar animation otherwise
mLauncher.getSearchDropTargetBar().animateToState(toSearchBarState, duration);
}
}