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

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

Merge "PiP: Hide Menu when Keyguard is showing."

parents 45c5b1c7 7c63532f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -254,7 +254,9 @@ public class PipMenuActivityController {
        if (isMenuVisible()) {
            // If the menu is visible in either the closed or full state, then hide the menu and
            // trigger the animation trigger afterwards
            if (onStartCallback != null) {
                onStartCallback.run();
            }
            mPipMenuView.hideMenu(onEndCallback);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -316,7 +316,7 @@ public class PipMenuView extends FrameLayout {
    }

    void hideMenu(Runnable animationEndCallback) {
        hideMenu(animationEndCallback, true /* notifyMenuVisibility */, false);
        hideMenu(animationEndCallback, true /* notifyMenuVisibility */, true /* animate */);
    }

    private void hideMenu(final Runnable animationFinishedRunnable, boolean notifyMenuVisibility,
+10 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ public final class WMShell extends SystemUI
    private final ProtoTracer mProtoTracer;

    private KeyguardUpdateMonitorCallback mSplitScreenKeyguardCallback;
    private KeyguardUpdateMonitorCallback mPipKeyguardCallback;
    private KeyguardUpdateMonitorCallback mOneHandedKeyguardCallback;

    @Inject
@@ -140,6 +141,15 @@ public final class WMShell extends SystemUI
                pip.showPictureInPictureMenu();
            }
        });
        mPipKeyguardCallback = new KeyguardUpdateMonitorCallback() {
            @Override
            public void onKeyguardVisibilityChanged(boolean showing) {
                if (showing) {
                    pip.hidePipMenu(null, null);
                }
            }
        };
        mKeyguardUpdateMonitor.registerCallback(mPipKeyguardCallback);
    }

    @VisibleForTesting