Add task menu item to move task to Desktop
- Call SystemUiProxy.moveToDesktop to move existing Overview tasks to desktop - Animation polish will be handled separately - Refactored AbstractFloatingView method into a helper to allow testing Fix: 320310347 Test: DesktopSystemShortcutTest, AbstractFloatingViewHelperTest Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT Change-Id: I2e4e04182e46ba4750e0683ee1789ba8fada06ea
This commit is contained in:
@@ -278,18 +278,7 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch
|
||||
|
||||
public static void closeOpenViews(ActivityContext activity, boolean animate,
|
||||
@FloatingViewType int type) {
|
||||
BaseDragLayer dragLayer = activity.getDragLayer();
|
||||
// Iterate in reverse order. AbstractFloatingView is added later to the dragLayer,
|
||||
// and will be one of the last views.
|
||||
for (int i = dragLayer.getChildCount() - 1; i >= 0; i--) {
|
||||
View child = dragLayer.getChildAt(i);
|
||||
if (child instanceof AbstractFloatingView) {
|
||||
AbstractFloatingView abs = (AbstractFloatingView) child;
|
||||
if (abs.isOfType(type)) {
|
||||
abs.close(animate);
|
||||
}
|
||||
}
|
||||
}
|
||||
new AbstractFloatingViewHelper().closeOpenViews(activity, animate, type);
|
||||
}
|
||||
|
||||
public static void closeAllOpenViews(ActivityContext activity, boolean animate) {
|
||||
|
||||
Reference in New Issue
Block a user