From 517cafff1827c6ca3ab6d79436fc1a36f20b0fe9 Mon Sep 17 00:00:00 2001 From: Thales Lima Date: Thu, 29 Sep 2022 19:08:02 +0100 Subject: [PATCH] Check for view measurement before animating Sometimes the view is there but it was not measured yet, and that was making the animation run with wrong icon position values. Fix: 233247401 Test: manual Change-Id: Ibcce24391e99b02ecdb492191c39b62d332abe4f --- .../src/com/android/quickstep/LauncherSwipeHandlerV2.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java b/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java index 36ca993f85..d1533f0347 100644 --- a/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java +++ b/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java @@ -84,7 +84,8 @@ public class LauncherSwipeHandlerV2 extends final View workspaceView = findWorkspaceView(launchCookies, mRecentsView.getRunningTaskView()); - boolean canUseWorkspaceView = workspaceView != null && workspaceView.isAttachedToWindow(); + boolean canUseWorkspaceView = workspaceView != null && workspaceView.isAttachedToWindow() + && workspaceView.getHeight() > 0; mActivity.getRootView().setForceHideBackArrow(true); if (!TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {