diff --git a/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java b/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java index e77a4504e5..b42eb067e4 100644 --- a/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java +++ b/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java @@ -371,8 +371,8 @@ public class FallbackSwipeHandler extends if (mSpringAnim != null) { mSpringAnim.onTargetPositionChanged(); } - mOnFinishCallback = data.getParcelable(EXTRA_ON_FINISH_CALLBACK); } + mOnFinishCallback = data.getParcelable(EXTRA_ON_FINISH_CALLBACK); maybeSendEndMessage(); } catch (Exception e) { // Ignore diff --git a/src/com/android/launcher3/views/FloatingSurfaceView.java b/src/com/android/launcher3/views/FloatingSurfaceView.java index 76b6fdebad..c60e1a41cd 100644 --- a/src/com/android/launcher3/views/FloatingSurfaceView.java +++ b/src/com/android/launcher3/views/FloatingSurfaceView.java @@ -175,7 +175,6 @@ public class FloatingSurfaceView extends AbstractFloatingView implements if (!mTmpPosition.equals(mIconPosition)) { mIconPosition.set(mTmpPosition); - sendIconInfo(); LayoutParams lp = (LayoutParams) mSurfaceView.getLayoutParams(); lp.width = Math.round(mIconPosition.width()); @@ -184,6 +183,9 @@ public class FloatingSurfaceView extends AbstractFloatingView implements lp.topMargin = Math.round(mIconPosition.top); } } + + sendIconInfo(); + if (mIcon != null && iconChanged && !mIconBounds.isEmpty()) { // Record the icon display setCurrentIconVisible(true); @@ -197,7 +199,7 @@ public class FloatingSurfaceView extends AbstractFloatingView implements } private void sendIconInfo() { - if (mContract != null && !mIconPosition.isEmpty()) { + if (mContract != null) { mContract.sendEndPosition(mIconPosition, mLauncher, mSurfaceView.getSurfaceControl()); } } diff --git a/tests/src/com/android/launcher3/allapps/TaplAllAppsIconsWorkingTest.java b/tests/src/com/android/launcher3/allapps/TaplAllAppsIconsWorkingTest.java index 27a2c75795..ba74244bd0 100644 --- a/tests/src/com/android/launcher3/allapps/TaplAllAppsIconsWorkingTest.java +++ b/tests/src/com/android/launcher3/allapps/TaplAllAppsIconsWorkingTest.java @@ -62,5 +62,6 @@ public class TaplAllAppsIconsWorkingTest extends AbstractLauncherUiTest { } finally { allApps.unfreeze(); } + mLauncher.goHome(); } }