mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Immediately close taskbar all apps on swipe up gesture." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
90f9499735
@@ -34,7 +34,6 @@ import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.QuickstepTransitionManager;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.logging.InstanceId;
|
||||
import com.android.launcher3.logging.InstanceIdSequence;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
|
||||
@@ -68,4 +68,11 @@ public class TaskbarUIController {
|
||||
public void setSystemGestureInProgress(boolean inProgress) {
|
||||
mControllers.taskbarStashController.setSystemGestureInProgress(inProgress);
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually closes the all apps window.
|
||||
*/
|
||||
public void hideAllApps() {
|
||||
mControllers.taskbarAllAppsController.hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +131,11 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList
|
||||
.setPredictedApps(mPredictedApps);
|
||||
}
|
||||
|
||||
/** Closes the {@link TaskbarAllAppsContainerView}. */
|
||||
public void hide() {
|
||||
mProxyView.close(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the all apps window from the hierarchy, if all floating views are closed and there is
|
||||
* no system drag operation in progress.
|
||||
|
||||
@@ -69,6 +69,7 @@ import com.android.systemui.shared.recents.model.ThumbnailData;
|
||||
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
@@ -193,7 +194,12 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
|
||||
activity.getStateManager().moveToRestState();
|
||||
}
|
||||
|
||||
public void closeOverlay() { }
|
||||
/**
|
||||
* Closes any overlays.
|
||||
*/
|
||||
public void closeOverlay() {
|
||||
Optional.ofNullable(getTaskbarController()).ifPresent(TaskbarUIController::hideAllApps);
|
||||
}
|
||||
|
||||
public void switchRunningTaskViewToScreenshot(HashMap<Integer, ThumbnailData> thumbnailDatas,
|
||||
Runnable runnable) {
|
||||
|
||||
@@ -280,6 +280,7 @@ public final class LauncherActivityInterface extends
|
||||
|
||||
@Override
|
||||
public void closeOverlay() {
|
||||
super.closeOverlay();
|
||||
Launcher launcher = getCreatedActivity();
|
||||
if (launcher == null) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user