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

Commit 4d0e87d9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix context submenu position"

parents a5ffafbf a6dfa74d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -551,6 +551,7 @@ public class MenuBuilder implements Menu {
        mPreventDispatchingItemsChanged = true;
        clear();
        clearHeader();
        mPresenters.clear();
        mPreventDispatchingItemsChanged = false;
        mItemsChangedWhileDispatchPrevented = false;
        onItemsChanged(true);
+7 −0
Original line number Diff line number Diff line
@@ -41,6 +41,13 @@ public class ContextMenuTest extends ActivityInstrumentationTestCase<ContextMenu
        testMenuPosition(getActivity().getTargetRtl());
    }

    public void testContextMenuPositionRepetitive() throws InterruptedException {
        // Regression test for b/72507876
        testMenuPosition(getActivity().getTargetLtr());
        testMenuPosition(getActivity().getTargetRtl());
        testMenuPosition(getActivity().getTargetLtr());
    }

    private void testMenuPosition(View target) throws InterruptedException {
        final int minScreenDimension = getMinScreenDimension();
        if (minScreenDimension < 320) {