From 39a87fda17c707fc211d2b65e49f8cdeacb6f345 Mon Sep 17 00:00:00 2001 From: Steven Ng Date: Thu, 1 Jul 2021 10:21:58 +0100 Subject: [PATCH] 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. Bug: 191646816 Test: Manual Change-Id: I901743f8ba392de37f3ef69ca386c4b36bfebd7f Merged-In: I901743f8ba392de37f3ef69ca386c4b36bfebd7f --- src/com/android/launcher3/dragndrop/DragView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java index fb1a6bef18..aa2dee0792 100644 --- a/src/com/android/launcher3/dragndrop/DragView.java +++ b/src/com/android/launcher3/dragndrop/DragView.java @@ -447,12 +447,12 @@ public abstract class DragView extends Fram mContent.draw(picture.beginRecording(mWidth, mHeight)); picture.endRecording(); View view = new View(mActivity); - 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);