From ca6fe31ff88c8a3969f023a482e75ccb77763eab Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 23 Aug 2024 16:34:44 +0200 Subject: [PATCH] Simplify code. --- .../features/call/impl/ui/ElementCallActivity.kt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt index aace025bb4..8c758c2ee5 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt @@ -260,18 +260,14 @@ class ElementCallActivity : } } + @RequiresApi(Build.VERSION_CODES.O) override fun setPipParams() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - setPictureInPictureParams(getPictureInPictureParams()) - } + setPictureInPictureParams(getPictureInPictureParams()) } + @RequiresApi(Build.VERSION_CODES.O) override fun enterPipMode(): Boolean { - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - enterPictureInPictureMode(getPictureInPictureParams()) - } else { - false - } + return enterPictureInPictureMode(getPictureInPictureParams()) } @RequiresApi(Build.VERSION_CODES.O)