mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Fixing regression in L3 with search bar transition.
Change-Id: Ia4155a653012c5d23df21167233fe766e5479347
This commit is contained in:
@@ -3571,8 +3571,12 @@ public class Launcher extends Activity
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
public boolean launcherCallbacksProvidesSearch() {
|
||||
return (mLauncherCallbacks != null && mLauncherCallbacks.providesSearch());
|
||||
}
|
||||
|
||||
public View getOrCreateQsbBar() {
|
||||
if (mLauncherCallbacks != null && mLauncherCallbacks.providesSearch()) {
|
||||
if (launcherCallbacksProvidesSearch()) {
|
||||
return mLauncherCallbacks.getQsbBar();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user