mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Fix cast exception when dropping widgets to a drop target
When inflating a widget directly in the DragView, I've overridden the layout param to FrameLayout.LayoutParam. Before drag complete, we should restore the previous layout param. Test: Drag a widget to a drop target. No crash is observed. Bug: 186111130 Change-Id: Ifd33d57a886496ab31d4e741870b0ae18ca9ce4e
This commit is contained in:
@@ -240,6 +240,7 @@ public abstract class ButtonDropTarget extends TextView
|
||||
|
||||
final Rect to = getIconRect(d);
|
||||
final float scale = (float) to.width() / from.width();
|
||||
d.dragView.detachContentView(/* reattachToPreviousParent= */ true);
|
||||
mDropTargetBar.deferOnDragEnd();
|
||||
|
||||
Runnable onAnimationEndRunnable = () -> {
|
||||
|
||||
Reference in New Issue
Block a user