diff --git a/vector/src/main/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml
index bb56c4532e..07606d315c 100644
--- a/vector/src/main/AndroidManifest.xml
+++ b/vector/src/main/AndroidManifest.xml
@@ -235,10 +235,11 @@
+
diff --git a/vector/src/main/java/im/vector/app/features/call/conference/VectorJitsiActivity.kt b/vector/src/main/java/im/vector/app/features/call/conference/VectorJitsiActivity.kt
index 7fe2c2da0b..a8b3230954 100644
--- a/vector/src/main/java/im/vector/app/features/call/conference/VectorJitsiActivity.kt
+++ b/vector/src/main/java/im/vector/app/features/call/conference/VectorJitsiActivity.kt
@@ -20,6 +20,8 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
+import android.content.pm.PackageManager
+import android.content.res.Configuration
import android.os.Bundle
import android.os.Parcelable
import android.widget.FrameLayout
@@ -31,6 +33,7 @@ import com.airbnb.mvrx.Success
import com.airbnb.mvrx.viewModel
import com.facebook.react.modules.core.PermissionListener
import im.vector.app.core.di.ScreenComponent
+import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityJitsiBinding
import kotlinx.parcelize.Parcelize
@@ -81,14 +84,20 @@ class VectorJitsiActivity : VectorBaseActivity(), JitsiMee
}
jitsiViewModel.observeViewEvents {
- when(it) {
+ when (it) {
is JitsiCallViewEvents.StartConference -> configureJitsiView(it)
- }
+ }.exhaustive
}
registerForBroadcastMessages()
}
+ override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean,
+ newConfig: Configuration) {
+ super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
+ Timber.w("onPictureInPictureModeChanged($isInPictureInPictureMode)")
+ }
+
override fun initUiAndData() {
super.initUiAndData()
jitsiMeetView = JitsiMeetView(this)
@@ -131,9 +140,9 @@ class VectorJitsiActivity : VectorBaseActivity(), JitsiMee
jitsiMeetView?.join(jitsiMeetConferenceOptions)
}
- override fun onPause() {
+ override fun onStop() {
JitsiMeetActivityDelegate.onHostPause(this)
- super.onPause()
+ super.onStop()
}
override fun onResume() {
@@ -154,7 +163,9 @@ class VectorJitsiActivity : VectorBaseActivity(), JitsiMee
override fun onUserLeaveHint() {
super.onUserLeaveHint()
- jitsiMeetView?.enterPictureInPicture()
+ if (packageManager.hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE)) {
+ jitsiMeetView?.enterPictureInPicture()
+ }
}
override fun onNewIntent(intent: Intent?) {