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

Commit 5996319d authored by Jacqueline Bronger's avatar Jacqueline Bronger
Browse files

Close the TV PiP menu when losing window focus.

Bug: 219885877
Test: manual - open a PiP, then long press HOME -> menu should close
Change-Id: I20b255f78e9e21a05a8138ef09ab00cce3f2521c
parent a512a9b9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -494,6 +494,14 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener {
        setFrameHighlighted(false);
    }

    @Override
    public void onWindowFocusChanged(boolean hasWindowFocus) {
        super.onWindowFocusChanged(hasWindowFocus);
        if (!hasWindowFocus) {
            hideAllUserControls();
        }
    }

    private void animateAlphaTo(float alpha, View view) {
        if (view.getAlpha() == alpha) {
            return;