mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user