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

Commit 12b0dfb8 authored by Steven Ng's avatar Steven Ng
Browse files

Fix widget animation truncated at drop if a widget is resized

Set the widget outline to DragView rather than the content view
hosting a Picture record of AppWidgetHostView at drop.

Fix: 191646816
Test: Manual
Change-Id: I901743f8ba392de37f3ef69ca386c4b36bfebd7f
Merged-In: I901743f8ba392de37f3ef69ca386c4b36bfebd7f
parent 7ed32025
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -471,12 +471,12 @@ public class DragView extends FrameLayout implements StateListener<LauncherState
            mContent.draw(picture.beginRecording(mWidth, mHeight));
            picture.endRecording();
            View view = new View(mLauncher);
            view.setClipToOutline(mContent.getClipToOutline());
            view.setOutlineProvider(mContent.getOutlineProvider());
            view.setBackground(new PictureDrawable(picture));
            view.measure(makeMeasureSpec(mWidth, EXACTLY), makeMeasureSpec(mHeight, EXACTLY));
            view.layout(mContent.getLeft(), mContent.getTop(),
                    mContent.getRight(), mContent.getBottom());
            setClipToOutline(mContent.getClipToOutline());
            setOutlineProvider(mContent.getOutlineProvider());
            addViewInLayout(view, indexOfChild(mContent), mContent.getLayoutParams(), true);

            removeViewInLayout(mContent);