Ignore touches in taskbar and all apps windows during system drag.

Touches are ignored as soon as we want to start system drag so that system drag can start sooner (i.e. before any AbstractFloatingView animations finish). This approach utilizes ViewTreeObserverWrapper's compute insets listener by temporarily setting the touch region to empty. The taskbar window remains fullscreen until the drag finishes so the touch region is reset at the right point. Similarly, the all apps window is kept open during its drag operations until the drag finishes. System drag state is now exposed through the drag controller to skip predrag.

Test: Manual by dragging to split screen and triggering dismissal
animation from both windows. Verified predrag works.
Fix: 221104066
Fix: 220070070

Change-Id: I424106269c841f58cbe5338d30b6c33fbd889019
This commit is contained in:
Brian Isganitis
2022-02-24 18:57:59 -08:00
parent 281182739a
commit 1bc23b7662
7 changed files with 70 additions and 7 deletions

View File

@@ -64,6 +64,9 @@ public abstract class BaseTaskbarContext extends ContextThemeWrapper implements
/** Callback invoked when a drag is initiated within this context. */
public abstract void onDragStart();
/** Callback invoked when a drag is finished within this context. */
public abstract void onDragEnd();
/** Callback invoked when a popup is shown or closed within this context. */
public abstract void onPopupVisibilityChanged(boolean isVisible);
}