File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
app/src/main/java/com/immichframe/immichframe Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -675,19 +675,14 @@ class MainActivity : AppCompatActivity() {
675675 }
676676
677677 private fun screenDim (dim : Boolean ) {
678- val lp = WindowManager .LayoutParams ()
679- lp.copyFrom(window.attributes)
678+ val lp = window.attributes
680679 if (dim) {
681680 lp.screenBrightness = 0.01f
682681 window.attributes = lp
683682 if (dimOverlay.visibility != View .VISIBLE ) {
684683 dimOverlay.apply {
685684 visibility = View .VISIBLE
686685 alpha = 0f
687- /* isClickable = true
688- setOnClickListener {
689- screenDim(false)
690- }*/
691686 stopImageTimer()
692687 stopWeatherTimer()
693688 animate()
@@ -697,15 +692,12 @@ class MainActivity : AppCompatActivity() {
697692 }
698693 }
699694 } else {
700- lp.screenBrightness = 1f
695+ lp.screenBrightness = WindowManager . LayoutParams . BRIGHTNESS_OVERRIDE_NONE
701696 window.attributes = lp
702697 if (dimOverlay.visibility == View .VISIBLE ) {
703698 dimOverlay.animate()
704699 .alpha(0f )
705700 .setDuration(500L )
706- /* .withStartAction {
707- dimOverlay.isClickable = false
708- }*/
709701 .withEndAction {
710702 dimOverlay.visibility = View .GONE
711703 loadSettings()
You can’t perform that action at this time.
0 commit comments