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

Commit 4fc8a9f9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[2/2] Fix widget resize frame show up at skewed location." into main

parents ab21ddb2 59091e46
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1551,7 +1551,13 @@ public class Launcher extends StatefulActivity<LauncherState>
            LauncherAppWidgetInfo launcherInfo,
            CellPos presenterPos) {
        CellLayout cellLayout = getCellLayout(launcherInfo.container, presenterPos.screenId);
        if (mStateManager.getState() == NORMAL) {
        // We should wait until launcher is not animating to show resize frame so that
        // {@link View#hasIdentityMatrix()} returns true (no scale effect) from CellLayout and
        // Workspace (they are widget's parent view). Otherwise widget's
        // {@link View#getLocationInWindow(int[])} will set skewed location, causing resize
        // frame not showing at skewed location in
        // {@link AppWidgetResizeFrame#snapToWidget(boolean)}.
        if (mStateManager.getState() == NORMAL && !mStateManager.isInTransition()) {
            AppWidgetResizeFrame.showForWidget(launcherHostView, cellLayout);
        } else {
            mStateManager.addStateListener(new StateManager.StateListener<LauncherState>() {