use max brightness at opening third party intents too, if selected

This commit is contained in:
tibbi 2019-02-21 11:31:50 +01:00
parent cf98323bd2
commit ceee81e4b8

View file

@ -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)