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

Commit 0a23daac authored by Adam Cohen's avatar Adam Cohen Committed by Android Git Automerger
Browse files

am 166ebd4d: De-parent custom content view before adding to custom content screen

* commit '166ebd4d':
  De-parent custom content view before adding to custom content screen
parents 52aa0636 166ebd4d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -619,6 +619,12 @@ public class Workspace extends SmoothPagedView
        if (customContent instanceof Insettable) {
            ((Insettable)customContent).setInsets(mInsets);
        }

        // Verify that the child is removed from any existing parent.
        if (customContent.getParent() instanceof ViewGroup) {
            ViewGroup parent = (ViewGroup) customContent.getParent();
            parent.removeView(customContent);
        }
        customScreen.removeAllViews();
        customScreen.addViewToCellLayout(customContent, 0, 0, lp, true);
        mCustomContentDescription = description;