Only animating QSB if it is visible when going home

Bug: 154863593
Change-Id: Icee925578985639e1117ff624a422082123bea1e
This commit is contained in:
Sunny Goyal
2020-06-03 13:07:25 -07:00
parent 2f53926848
commit f665787d0d
3 changed files with 15 additions and 4 deletions
@@ -15,6 +15,8 @@
*/
package com.android.launcher3.allapps;
import static com.android.launcher3.LauncherState.ALL_APPS_HEADER;
import android.graphics.Rect;
import android.view.KeyEvent;
import android.view.animation.Interpolator;
@@ -56,6 +58,13 @@ public interface SearchUiManager {
void setContentVisibility(int visibleElements, PropertySetter setter,
Interpolator interpolator);
/**
* Returns true if the QSB should be visible for the given set of visible elements
*/
default boolean isQsbVisible(int visibleElements) {
return (visibleElements & ALL_APPS_HEADER) != 0;
}
/**
* Called to control how the search UI result should be handled.
*