From ceee81e4b843d12f3c088722c8fa0813ef018396 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 21 Feb 2019 11:31:50 +0100 Subject: [PATCH] use max brightness at opening third party intents too, if selected --- .../gallery/pro/activities/PhotoVideoActivity.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt index c9c413caa..7c5338857 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt @@ -133,6 +133,12 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList fragment_holder.background = ColorDrawable(Color.BLACK) } + if (config.maxBrightness) { + val attributes = window.attributes + attributes.screenBrightness = 1f + window.attributes = attributes + } + window.decorView.setOnSystemUiVisibilityChangeListener { visibility -> val isFullscreen = visibility and View.SYSTEM_UI_FLAG_FULLSCREEN != 0 mFragment?.fullscreenToggled(isFullscreen)