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

Commit 8d1e9fc3 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "If the menu hasn't been created yet don't do things with it"...

Merge "Merge "If the menu hasn't been created yet don't do things with it" into oc-dr1-dev am: 214baa03 am: 0d74be5e"
parents bcd39d14 49ef9102
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -417,7 +417,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl

    @Override
    public void onHeightUpdate() {
        if (mParent == null || mMenuItems.size() == 0) {
        if (mParent == null || mMenuItems.size() == 0 || mMenuContainer == null) {
            return;
        }
        int parentHeight = mParent.getCollapsedHeight();
@@ -477,7 +477,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl

    private void setMenuLocation() {
        boolean showOnLeft = mTranslation > 0;
        if ((mIconsPlaced && showOnLeft == mOnLeft) || mSnapping
        if ((mIconsPlaced && showOnLeft == mOnLeft) || mSnapping || mMenuContainer == null
                || !mMenuContainer.isAttachedToWindow()) {
            // Do nothing
            return;
+6 −0
Original line number Diff line number Diff line
@@ -57,4 +57,10 @@ public class NotificationMenuRowTest extends LeakCheckedTest {
        row.createMenu(null, null);
        assertTrue(row.getMenuView() != null);
    }

    @Test
    public void testResetUncreatedMenu() {
        NotificationMenuRowPlugin row = new NotificationMenuRow(mContext);
        row.resetMenu();
    }
}