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

Commit 85a85276 authored by Mady Mellor's avatar Mady Mellor Committed by android-build-merger
Browse files

Merge "Make sure to remove child views when recreating notification menu row"...

Merge "Make sure to remove child views when recreating notification menu row" into oc-dev am: 1e943b3e
am: 4ba5995a

Change-Id: I80acb0ae322d9bfd5f3e2d52a569f080822b3a01
parents ab066639 4ba5995a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -120,6 +120,9 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
    @Override
    public void createMenu(ViewGroup parent) {
        mParent = (ExpandableNotificationRow) parent;
        if (mMenuContainer != null) {
            mMenuContainer.removeAllViews();
        }
        mMenuContainer = new FrameLayout(mContext);
        for (int i = 0; i < mMenuItems.size(); i++) {
            addMenuView(mMenuItems.get(i), mMenuContainer);
+7 −0
Original line number Diff line number Diff line
@@ -44,4 +44,11 @@ public class NotificationMenuRowTest extends LeakCheckedTest {
        ViewUtils.detachView(row.getMenuView());
        TestableLooper.get(this).processAllMessages();
    }

    @Test
    public void testRecreateMenu() {
        NotificationMenuRowPlugin row = new NotificationMenuRow(mContext);
        row.createMenu(null);
        row.createMenu(null);
    }
}