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

Commit 5c05f2dc authored by Jason Hsu's avatar Jason Hsu Committed by Android (Google) Code Review
Browse files

Merge "[Drag To Hide] Fix test case fail" into main

parents 2ce52b3f d44df344
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -240,7 +240,9 @@ class MenuViewLayer extends FrameLayout implements
        mMenuView.setOnTargetFeaturesChangeListener(newTargetFeatures -> {
            if (Flags.floatingMenuDragToHide()) {
                dismissNotification();
                if (newTargetFeatures.size() > 0) {
                    undo();
                }
            } else {
                if (newTargetFeatures.size() < 1) {
                    return;
+3 −3
Original line number Diff line number Diff line
@@ -181,16 +181,16 @@ public class MenuViewLayerTest extends SysuiTestCase {
    @Test
    public void onAttachedToWindow_menuIsVisible() {
        mMenuViewLayer.onAttachedToWindow();
        final View menuView = mMenuViewLayer.getChildAt(LayerIndex.MENU_VIEW);

        final View menuView = mMenuViewLayer.getChildAt(LayerIndex.MENU_VIEW);
        assertThat(menuView.getVisibility()).isEqualTo(VISIBLE);
    }

    @Test
    public void onAttachedToWindow_menuIsGone() {
    public void onDetachedFromWindow_menuIsGone() {
        mMenuViewLayer.onDetachedFromWindow();
        final View menuView = mMenuViewLayer.getChildAt(LayerIndex.MENU_VIEW);

        final View menuView = mMenuViewLayer.getChildAt(LayerIndex.MENU_VIEW);
        assertThat(menuView.getVisibility()).isEqualTo(GONE);
    }