Skip to content

Commit a4b6d4c

Browse files
committed
Simplify code.
1 parent 368db3f commit a4b6d4c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/ElementCallActivity.kt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,14 @@ class ElementCallActivity :
260260
}
261261
}
262262

263+
@RequiresApi(Build.VERSION_CODES.O)
263264
override fun setPipParams() {
264-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
265-
setPictureInPictureParams(getPictureInPictureParams())
266-
}
265+
setPictureInPictureParams(getPictureInPictureParams())
267266
}
268267

268+
@RequiresApi(Build.VERSION_CODES.O)
269269
override fun enterPipMode(): Boolean {
270-
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
271-
enterPictureInPictureMode(getPictureInPictureParams())
272-
} else {
273-
false
274-
}
270+
return enterPictureInPictureMode(getPictureInPictureParams())
275271
}
276272

277273
@RequiresApi(Build.VERSION_CODES.O)

0 commit comments

Comments
 (0)