From 3d27207ff6ff951add0a21b699761126d1af11ec Mon Sep 17 00:00:00 2001 From: Steven Ng Date: Fri, 9 Jul 2021 17:45:19 +0100 Subject: [PATCH] Clear WidgetCell#mItem before recylcing a WidgetCell This fixes a bug which reuses a previous widget item spans to compute the preview size. Fix: 193133048 Test: manual Change-Id: I5459882e258dc010898854dbbe52a6fa8d84796c --- src/com/android/launcher3/widget/WidgetCell.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java index c3edcce95a..6605509c89 100644 --- a/src/com/android/launcher3/widget/WidgetCell.java +++ b/src/com/android/launcher3/widget/WidgetCell.java @@ -177,6 +177,7 @@ public class WidgetCell extends LinearLayout implements OnLayoutChangeListener { mWidgetImageContainer.removeView(mAppWidgetHostViewPreview); } mAppWidgetHostViewPreview = null; + mItem = null; } public void setSourceContainer(int sourceContainer) {