From d0c00d433cf7f59567c474daa916234ca8c22853 Mon Sep 17 00:00:00 2001
From: tibbi <tibor@kaputa.sk>
Date: Thu, 3 Jan 2019 19:53:29 +0100
Subject: [PATCH] use max brightness at playing video if desired

---
 .../gallery/pro/activities/VideoPlayerActivity.kt          | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt
index a21c23d23..d4ea4fb25 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt
@@ -71,6 +71,13 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
         if (config.blackBackground) {
             video_player_holder.background = ColorDrawable(Color.BLACK)
         }
+
+        if (config.maxBrightness) {
+            val attributes = window.attributes
+            attributes.screenBrightness = 1f
+            window.attributes = attributes
+        }
+
         updateTextColors(video_player_holder)
     }