Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94477b23 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Tony Wickham
Browse files

Send finish callback even if there is no icon to animate to

Fixes: 321297170
Test: TaplAllAppsIconsWorkingTest#testAppIconLaunchFromAllAppsFromHome
Flag: none
Change-Id: Ia6084dd14715bab36c7dd1c983fabedcf9b10630
parent 3f4401aa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+4 −2
Original line number Diff line number Diff line
@@ -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());
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -62,5 +62,6 @@ public class TaplAllAppsIconsWorkingTest extends AbstractLauncherUiTest {
        } finally {
            allApps.unfreeze();
        }
        mLauncher.goHome();
    }
}