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

Commit bf7df8a8 authored by jorgegil@google.com's avatar jorgegil@google.com
Browse files

Only show Pip actions when menu is FULL (i.e. shown)

- The actions container viewgroup should only be visible
when the menu state is FULL
- Update the PipMenuView mMenuState before updating the
action views so that the views reflect the actual new
state of the pip menu.

Bug: 179046413
Test: Enter PiP from Youtube, tap on where the pause
icon would be if the menu was visible, verify it doesn't
pause the video.

Change-Id: I97c55fc12b8eca21a4aa2a94d7890330ca543fc1
parent b23f6d71
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -231,7 +231,6 @@ public class PipMenuView extends FrameLayout {
                    && (mMenuState == MENU_STATE_FULL || menuState == MENU_STATE_FULL);
            mAllowTouches = !disallowTouchesUntilAnimationEnd;
            cancelDelayedHide();
            updateActionViews(stackBounds);
            if (mMenuContainerAnimator != null) {
                mMenuContainerAnimator.cancel();
            }
@@ -280,6 +279,7 @@ public class PipMenuView extends FrameLayout {
                setVisibility(VISIBLE);
                mMenuContainerAnimator.start();
            }
            updateActionViews(stackBounds);
        } else {
            // If we are already visible, then just start the delayed dismiss and unregister any
            // existing input consumers from the previous drag
@@ -395,7 +395,7 @@ public class PipMenuView extends FrameLayout {
            return true;
        });

        if (mActions.isEmpty() || mMenuState == MENU_STATE_CLOSE) {
        if (mActions.isEmpty() || mMenuState == MENU_STATE_CLOSE || mMenuState == MENU_STATE_NONE) {
            actionsContainer.setVisibility(View.INVISIBLE);
        } else {
            actionsContainer.setVisibility(View.VISIBLE);