Skip to content

Commit

Permalink
fix(android): fix event handler to check based on Activity it's bound to
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJonghun committed Dec 15, 2024
1 parent 846412e commit 5e244e8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object PictureInPictureUtil {

val onPictureInPictureModeChanged: (info: PictureInPictureModeChangedInfo) -> Unit = { info: PictureInPictureModeChangedInfo ->
view.setIsInPictureInPicture(info.isInPictureInPictureMode)
if (!info.isInPictureInPictureMode && context.findActivity().lifecycle.currentState == Lifecycle.State.CREATED) {
if (!info.isInPictureInPictureMode && activity.lifecycle.currentState == Lifecycle.State.CREATED) {
// when user click close button of PIP
if (!view.playInBackground) view.setPausedModifier(true)
}
Expand Down

0 comments on commit 5e244e8

Please sign in to comment.