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

Commit cac7c6f6 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Send finish callback even if there is no icon to animate to" into main

parents 92dd621d 94477b23
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();
    }
}