Skip to content

Commit 53e8a12

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 3eb1fb8 + aec3469 commit 53e8a12

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/src/main/java/com/lagradost/cloudstream3/CommonActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ object CommonActivity {
313313
}
314314

315315
fun onUserLeaveHint(act: Activity?) {
316+
// On Android 12 and later we use setAutoEnterEnabled() instead.
317+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) return
316318
if (canEnterPipMode && canShowPipMode) {
317319
act?.enterPIPMode()
318320
}

app/src/main/java/com/lagradost/cloudstream3/ui/player/AbstractPlayerFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import com.lagradost.cloudstream3.utils.EpisodeSkip
5555
import com.lagradost.cloudstream3.utils.UIHelper
5656
import com.lagradost.cloudstream3.utils.UIHelper.hideSystemUI
5757
import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage
58+
import com.lagradost.cloudstream3.utils.UIHelper.shouldShowPIPMode
5859
import java.net.SocketTimeoutException
5960

6061
enum class PlayerResize(@StringRes val nameRes: Int) {
@@ -196,7 +197,7 @@ abstract class AbstractPlayerFragment(
196197
activity?.let { act ->
197198
PlayerPipHelper.updatePIPModeActions(
198199
act,
199-
isPlayingRightNow,
200+
act.shouldShowPIPMode(canEnterPipMode),
200201
player.getAspectRatio()
201202
)
202203
}

0 commit comments

Comments
 (0)