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

Commit 00628229 authored by Steven Ng's avatar Steven Ng Committed by Android (Google) Code Review
Browse files

Merge "Fix preview layout crash upon screen rotation" into sc-dev

parents 4049f539 db4ec8ac
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -492,6 +492,10 @@ public class LauncherAppWidgetHostView extends NavigableAppWidgetHostView
            return;
        }
        LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) getTag();
        if (info == null) {
            // This occurs when LauncherAppWidgetHostView is used to render a preview layout.
            return;
        }
        // Remove and rebind the current widget (which was inflated in the wrong
        // orientation), but don't delete it from the database
        mLauncher.removeItem(this, info, false  /* deleteFromDb */);