mediathekview / zapp

German public broadcasting live streams as an Android app
https://mediathekview.de/news/zapp/
MIT License
199 stars 33 forks source link

Brightness swipe guesture behavior on Fairphone 4 not straight forward #316

Closed justf0rfun closed 1 year ago

justf0rfun commented 2 years ago

Sometimes during video watching I like to drop the brightness to minimum. On Fairphone 4 5G (FP4) the brightness drops as I swipe down on the left side of the screen until a few millimeters before the bottom edge and then suddenly raises again. It is not at maximum but still quite brighter then before. That makes it tedious to use.

The reason for me to drop the brightness in the first place is a) to not blind me in when I am sitting in the dark b) to reduce keeping me awake when I watch video before going to sleep and c) to reduce energy consumption.

I don't have this issue on my old device. The main differences between both devices are that the new FP4 has an LCD and runs android 11 while the old device has an OLED and runs android 6.0 .

I hope that the bug(?) will be fixed so that the behavior of the swipe gesture will be straight forward, meaning that the brightness continually drops as I swipe down on the left side of the display without suddenly brightness going up.

Thanks in advance. :)

cemrich commented 2 years ago

I cannot reproduce this on my test device and will check the emulators.

cemrich commented 2 years ago

Finally: The Oneplus 3 shows the same bahaviour - this is a task for my next debugging session.

cemrich commented 2 years ago

This seems to be a device specific android bug. Setting WindowManager.LayoutParams.screenBrightness to 0 may cause the screen on some devices to get brighter. Zapp has no means to know, which devices are affected.

So we habe two options here:

  1. Limit the screen brightness to 1% minimum for all devices (like VLC)
  2. Use the "correct" behaviour and accect the bug on some devices
justf0rfun commented 2 years ago

I am not an Android developer but AFAICS there is no bug filed for this: https://issuetracker.google.com/issues?q=screenbrightness%20componentid:(192786%20%7C%20192805%20%7C%20192705%20%7C%20192792%20%7C%20192644%20%7C%20192694%20%7C%20192710%20%7C%20192810%20%7C%20192634%20%7C%20192698%20%7C%20192706%20%7C%20470386%20%7C%20192815%20%7C%20192715%20%7C%20192720%20%7C%20192711%20%7C%20192629%20%7C%20192643%20%7C%20192693%20%7C%20192639)

So you might create an entry.

justf0rfun commented 2 years ago

So we habe two options here:

1. Limit the screen brightness to 1% minimum for all devices (like VLC)

2. Use the "correct" behaviour and accect the bug on some devices

I found that the Sony XZ1 (G8341) on Android 9 is also affected. I can't see a pattern by display technology so I think we can't estimate how many devices are affected. Hence it would be hard to say how many users will face this issue. I guess only a minority of users will drop the brightness so far. Under that assumption proposal No. 2 would not be optimal but not catastrophic.

Regarding proposal No. 1 I would ask: How big is the difference between brightness of 0% and brightness of 1% for energy consumption, blending users in the dark and keeping them awake when they use Zapp before going to sleep. If the differences in these criteria are minor this approach might be better to cover all users.

What does minimum brightness actually mean? The answer might depend on display technology. Doesn't LCD IPS displays have LEDs behind the panel so bright that they shine through? A minimum value for those LEDs might mean to switch them off. In that case external lights would be needed to recognize something on the screen. Doesn't OLEDs miss those LEDs because the OLED pixels shine themselves? Can they be switches off, too? That are just questions that came to my mind when thinking about the API.

cemrich commented 1 year ago

I am not an Android developer but AFAICS there is no bug filed for this

This is because even Android developers have no idea in which of the many bugtrackers exactly to file bugs ;)

Regarding proposal No. 1 I would ask: How big is the difference between brightness of 0% and brightness of 1% for energy consumption.

This last step (from 1% to 0%) is quite substantial - at least visually. It might be desired to have a very, very dark screen when watching in very dark environments.

cemrich commented 1 year ago

Okay, I'll leave it as it is now. The few affected users can easily work araound this bug.