From afbe3ce1531135bca71a0b1c266394527af10a4d Mon Sep 17 00:00:00 2001 From: Marcel Dopita Date: Fri, 16 Apr 2021 21:49:55 +0200 Subject: [PATCH] Hide statusbar when switching to PiP and back without activating controller --- app/src/main/java/com/brouken/player/PlayerActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/brouken/player/PlayerActivity.java b/app/src/main/java/com/brouken/player/PlayerActivity.java index 23447ee2..a8acb7ab 100644 --- a/app/src/main/java/com/brouken/player/PlayerActivity.java +++ b/app/src/main/java/com/brouken/player/PlayerActivity.java @@ -568,8 +568,12 @@ public void onReceive(Context context, Intent intent) { mReceiver = null; } playerView.setControllerAutoShow(true); - if (player != null && !player.isPlaying()) - playerView.showController(); + if (player != null) { + if (player.isPlaying()) + Utils.hideSystemUi(playerView); + else + playerView.showController(); + } } }