mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 13:35:33 +03:00
finish call activity if closed via "X" in pip mode
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
7f19816961
commit
d4322bf2d9
1 changed files with 11 additions and 3 deletions
|
@ -49,6 +49,7 @@ import com.nextcloud.talk.utils.bundle.BundleKeys
|
||||||
class MagicCallActivity : BaseActivity() {
|
class MagicCallActivity : BaseActivity() {
|
||||||
lateinit var binding: ActivityMagicCallBinding
|
lateinit var binding: ActivityMagicCallBinding
|
||||||
private var router: Router? = null
|
private var router: Router? = null
|
||||||
|
var isInPipMode: Boolean = false
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -142,8 +143,10 @@ class MagicCallActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean,
|
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, newConfig: Configuration) {
|
||||||
newConfig: Configuration) {
|
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
|
||||||
|
isInPipMode = isInPictureInPictureMode
|
||||||
|
|
||||||
if (isInPictureInPictureMode) {
|
if (isInPictureInPictureMode) {
|
||||||
Log.d(TAG, "Hide the full-screen UI (controls, etc.) while in picture-in-picture mode.")
|
Log.d(TAG, "Hide the full-screen UI (controls, etc.) while in picture-in-picture mode.")
|
||||||
} else {
|
} else {
|
||||||
|
@ -151,7 +154,12 @@ class MagicCallActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onStop() {
|
||||||
|
super.onStop()
|
||||||
|
if (isInPipMode) {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = "MagicCallActivity"
|
private val TAG = "MagicCallActivity"
|
||||||
|
|
Loading…
Reference in a new issue