mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Don't set Taskbar window to non-fullscreen while folder animates closed
Test: Open an app, open a folder in taskbar, and drag an app from the folder. Ensure the folder close animation plays completely. Fixes: 199954907 Change-Id: I1caec4ef24b5325724d74f10ddbeae6ef8f9e959
This commit is contained in:
@@ -195,10 +195,24 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view matching FloatingViewType
|
||||
* Returns a view matching FloatingViewType and {@link #isOpen()} == true.
|
||||
*/
|
||||
public static <T extends AbstractFloatingView> T getOpenView(
|
||||
ActivityContext activity, @FloatingViewType int type) {
|
||||
return getView(activity, type, true /* mustBeOpen */);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a view matching FloatingViewType, and {@link #isOpen()} may be false (if animating
|
||||
* closed).
|
||||
*/
|
||||
public static <T extends AbstractFloatingView> T getAnyView(
|
||||
ActivityContext activity, @FloatingViewType int type) {
|
||||
return getView(activity, type, false /* mustBeOpen */);
|
||||
}
|
||||
|
||||
private static <T extends AbstractFloatingView> T getView(
|
||||
ActivityContext activity, @FloatingViewType int type, boolean mustBeOpen) {
|
||||
BaseDragLayer dragLayer = activity.getDragLayer();
|
||||
if (dragLayer == null) return null;
|
||||
// Iterate in reverse order. AbstractFloatingView is added later to the dragLayer,
|
||||
@@ -207,7 +221,7 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
View child = dragLayer.getChildAt(i);
|
||||
if (child instanceof AbstractFloatingView) {
|
||||
AbstractFloatingView view = (AbstractFloatingView) child;
|
||||
if (view.isOfType(type) && view.isOpen()) {
|
||||
if (view.isOfType(type) && (!mustBeOpen || view.isOpen())) {
|
||||
return (T) view;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user