Polish all apps taskbar unstash behavior for transient and persistent.

- During gestures from taskbar all apps, unstash immediately in
  transient.
- Overlay closes sooner if all apps is open (still done later for EDU).
- Taskbar stashes in overview when All Apps is opened.
- Transient app-window threshold is ignored if All Apps is opened.

Test: Manual
Fix: 262076812
Change-Id: I46b2dcdc75ee0cc15c1b47da2139ff8c20cf618a
This commit is contained in:
Brian Isganitis
2022-12-12 16:23:22 -05:00
parent 742294305f
commit 2a2f1b6cd3
6 changed files with 41 additions and 20 deletions

View File

@@ -42,6 +42,7 @@ import java.util.List;
public final class TaskbarAllAppsController {
private TaskbarControllers mControllers;
private @Nullable TaskbarAllAppsSlideInView mSlideInView;
private @Nullable TaskbarAllAppsContainerView mAppsView;
// Application data models.
@@ -107,6 +108,11 @@ public final class TaskbarAllAppsController {
show(true);
}
/** Returns {@code true} if All Apps is open. */
public boolean isOpen() {
return mSlideInView != null && mSlideInView.isOpen();
}
private void show(boolean animate) {
if (mAppsView != null) {
return;
@@ -117,15 +123,15 @@ public final class TaskbarAllAppsController {
TaskbarOverlayContext overlayContext =
mControllers.taskbarOverlayController.requestWindow();
TaskbarAllAppsSlideInView slideInView =
(TaskbarAllAppsSlideInView) overlayContext.getLayoutInflater().inflate(
R.layout.taskbar_all_apps, overlayContext.getDragLayer(), false);
slideInView.addOnCloseListener(() -> {
mSlideInView = (TaskbarAllAppsSlideInView) overlayContext.getLayoutInflater().inflate(
R.layout.taskbar_all_apps, overlayContext.getDragLayer(), false);
mSlideInView.addOnCloseListener(() -> {
mControllers.getSharedState().allAppsVisible = false;
mSlideInView = null;
mAppsView = null;
});
TaskbarAllAppsViewController viewController = new TaskbarAllAppsViewController(
overlayContext, slideInView, mControllers);
overlayContext, mSlideInView, mControllers);
viewController.show(animate);
mAppsView = overlayContext.getAppsView();