mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 19:10:43 +00:00
Fix PiP crash with IllegalStateException. Activity must be resumed to enter PiP mode.
https://sentry.tools.element.io/organizations/element/issues/1449388/events/2eb06349f6224481960a64916d51ae60/?project=59
This commit is contained in:
+5
-1
@@ -281,7 +281,11 @@ class ElementCallActivity :
|
|||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
override fun enterPipMode(): Boolean {
|
override fun enterPipMode(): Boolean {
|
||||||
return enterPictureInPictureMode(getPictureInPictureParams())
|
return if (lifecycle.currentState.isAtLeast(Lifecycle.State.RESUMED)) {
|
||||||
|
enterPictureInPictureMode(getPictureInPictureParams())
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
|
|||||||
Reference in New Issue
Block a user