From 0e36f653e53893d50a4dc5e2cdadccbe84a8c9f5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 31 Mar 2021 11:50:48 +0200 Subject: [PATCH] handle max brightness at panoramas too --- .../gallery/pro/activities/PanoramaPhotoActivity.kt | 6 ++++++ .../gallery/pro/activities/PanoramaVideoActivity.kt | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaPhotoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaPhotoActivity.kt index 362bd6f8b..f2bb28a04 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaPhotoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaPhotoActivity.kt @@ -57,6 +57,12 @@ open class PanoramaPhotoActivity : SimpleActivity() { } window.statusBarColor = resources.getColor(R.color.circle_black_background) + + if (config.maxBrightness) { + val attributes = window.attributes + attributes.screenBrightness = 1f + window.attributes = attributes + } } override fun onPause() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaVideoActivity.kt index 7098e3e4a..e546ec1af 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PanoramaVideoActivity.kt @@ -55,6 +55,12 @@ open class PanoramaVideoActivity : SimpleActivity(), SeekBar.OnSeekBarChangeList } window.statusBarColor = resources.getColor(R.color.circle_black_background) + + if (config.maxBrightness) { + val attributes = window.attributes + attributes.screenBrightness = 1f + window.attributes = attributes + } } override fun onPause() {