From 7a79601cfcd7cbcfd2c83dcafccf0d755a407977 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Mon, 25 May 2020 05:47:14 +0100 Subject: [PATCH] don't enable fullscreen mode when entering PIP mode --- app/src/main/java/io/lbry/browser/MainActivity.java | 3 ++- .../java/io/lbry/browser/ui/findcontent/FileViewFragment.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index b9fc5105..0f5237c5 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -190,7 +190,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener public static SimpleExoPlayer appPlayer; public static Cache playerCache; public static boolean playerReassigned; - public static CastContext castContext; + public CastContext castContext; public static CastPlayer castPlayer; public static Claim nowPlayingClaim; public static String nowPlayingClaimUrl; @@ -198,6 +198,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener public static boolean startingShareActivity = false; public static boolean startingPermissionRequest = false; public static boolean startingSignInFlowActivity = false; + @Getter private boolean enteringPIPMode = false; private boolean fullSyncInProgress = false; private int queuedSyncCount = 0; 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 515dabed..e088f0e5 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 @@ -2196,7 +2196,7 @@ public class FileViewFragment extends BaseFragment implements Context context = getContext(); if (context instanceof MainActivity) { MainActivity activity = (MainActivity) context; - if (activity.isInPictureInPictureMode()) { + if (activity.isEnteringPIPMode() || activity.isInPictureInPictureMode()) { return; } if (claim != null && claim.isPlayable() && !activity.isInFullscreenMode()) {