mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Ignore recents transition if there are no closing tasks am: 6f7e15ff64
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23909000 Change-Id: I8077d28abcee554ef793df5eefc7ceab94ec0149 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.quickstep;
|
||||
|
||||
import static android.view.RemoteAnimationTarget.MODE_CLOSING;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
|
||||
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
@@ -37,6 +38,7 @@ import com.android.systemui.shared.recents.model.ThumbnailData;
|
||||
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -101,9 +103,22 @@ public class RecentsAnimationCallbacks implements
|
||||
RemoteAnimationTarget[] appTargets,
|
||||
RemoteAnimationTarget[] wallpaperTargets,
|
||||
Rect homeContentInsets, Rect minimizedHomeBounds) {
|
||||
long appCount = Arrays.stream(appTargets)
|
||||
.filter(app -> app.mode == MODE_CLOSING)
|
||||
.count();
|
||||
if (appCount == 0) {
|
||||
// Edge case, if there are no closing app targets, then Launcher has nothing to handle
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
/* event= */ "RecentsAnimationCallbacks.onAnimationStart (canceled)",
|
||||
/* extras= */ 0,
|
||||
/* gestureEvent= */ START_RECENTS_ANIMATION);
|
||||
notifyAnimationCanceled();
|
||||
animationController.finish(false /* toHome */, false /* sendUserLeaveHint */);
|
||||
return;
|
||||
}
|
||||
|
||||
mController = new RecentsAnimationController(animationController,
|
||||
mAllowMinimizeSplitScreen, this::onAnimationFinished);
|
||||
|
||||
if (mCancelled) {
|
||||
Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(),
|
||||
mController::finishAnimationToApp);
|
||||
|
||||
Reference in New Issue
Block a user