From 518ec738f30e515777a231e39b51bd56060ad299 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 24 Aug 2022 17:59:46 +0200 Subject: [PATCH] Reduce level API check, this seems not necessary. --- .../lib/attachmentviewer/AttachmentViewerActivity.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/AttachmentViewerActivity.kt b/library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/AttachmentViewerActivity.kt index ca91ddb621..98398760d1 100644 --- a/library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/AttachmentViewerActivity.kt +++ b/library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/AttachmentViewerActivity.kt @@ -17,7 +17,6 @@ package im.vector.lib.attachmentviewer -import android.annotation.SuppressLint import android.graphics.Color import android.os.Build import android.os.Bundle @@ -352,12 +351,7 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi // new API instead of SYSTEM_UI_FLAG_HIDE_NAVIGATION window.decorView.windowInsetsController?.hide(WindowInsets.Type.navigationBars()) // New API instead of SYSTEM_UI_FLAG_IMMERSIVE - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - window.decorView.windowInsetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE - } else { - @SuppressLint("WrongConstant") - window.decorView.windowInsetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_SWIPE - } + window.decorView.windowInsetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE // New API instead of FLAG_TRANSLUCENT_STATUS window.statusBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar) // New API instead of FLAG_TRANSLUCENT_NAVIGATION