elastic-rock / Candle

An Android display torch
GNU General Public License v3.0
23 stars 3 forks source link

Max brightness when slider is on the left #3

Closed salihmarangoz closed 11 months ago

salihmarangoz commented 11 months ago

Brightness of my phone's screen goes maximum with the slider's minimum value.

model: xiaomi mi a1

elastic-rock commented 11 months ago

Does the brightness change at all when the slider is moved?

salihmarangoz commented 11 months ago

yes, it changes.

correction: it doesn't maximize the brightness but increases suddenly (to a mid-level brightness) when the slider value is minimized (on the leftmost side)

elastic-rock commented 11 months ago

Could you film the device?

salihmarangoz commented 11 months ago

https://github.com/elastic-rock/Candle/assets/12991962/ed94170c-285b-43bf-a71b-5d055bdd6b23

elastic-rock commented 11 months ago

What is your device model? Do you have a custom rom installed?

EDIT: My bad. You already posted the model.

elastic-rock commented 11 months ago

The thing is, it seems to me that this is a device issue and not necessarily of the app (whilst I could programmatically counter for it). It seems that your device takes the screenTimeout value of 0.0 as not overriding. However, the value of 0.0 should be taken as minimum and -1.0 as not overriding. I would prefer that the issue is fixed with the OS developers (if possible) rather than in the app, as other people would then not be able to achieve the actual minimum or there would have to be a field somewhere in the app to set the minimum value.

salihmarangoz commented 11 months ago

You are right. It is just a stupid bug... (also here: https://gitlab.com/LineageOS/issues/android/-/issues/5021)

So the bug is out there and since it is not a significant bug probably it will not be fixed by the developers. I think it would be best to check if the minimum value is equal to zero, and then add a small value to workaround this bug.

elastic-rock commented 11 months ago

Apps cannot check the maximum and minimum values of the device and it would therefore require that the minimum value of the slider would be set higher for all users. I am sorry to say, but I consider that to be an issue of the LineageOS port and therefore out of the scope of this project.