From d6baf3d1c8bc074ec6e7a8cd505d863334560166 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 4 Sep 2020 12:32:53 +0100 Subject: [PATCH] display player view correctly after dismissing PIP view --- app/src/main/java/io/lbry/browser/MainActivity.java | 3 +++ .../java/io/lbry/browser/ui/findcontent/FileViewFragment.java | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 1e2dde9d..676a2a2f 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -3095,6 +3095,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener if (appPlayer != null && inPictureInPictureMode && !isBackgroundPlaybackEnabled()) { appPlayer.setPlayWhenReady(false); } + if (inPictureInPictureMode) { + MainActivity.playerReassigned = true; + } super.onStop(); } diff --git a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java index 3dc97711..b0e338f5 100644 --- a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java @@ -772,6 +772,7 @@ public class FileViewFragment extends BaseFragment implements View root = getView(); if (root != null) { PlayerView view = root.findViewById(R.id.file_view_exoplayer_view); + view.setVisibility(View.VISIBLE); view.setPlayer(null); view.setPlayer(MainActivity.appPlayer); }