Lux is just part of the solution for me. The app has an excellent debug feature to watch the raw sensor data. Using this feature I can see that the sensor data itself has a problem.
Steps to reproduce:
- put tablet in direct sunlight or under a bright lamp
- start the debug readout of the brightness sensor
- cover the sensor by hand (sensor is situated top-right from the G in Samsung)
- observe the reading on the screen: it is something below 10.0 for me
- move the hand away from the screen very slowly but still covering the sensor from direct light: the sensor reading increases gradually to values around 100 to 200. It is easily possible to achieve any value up to here by just varying the position of the hand.
- when the sensor readout reaches a value above 250, I can observe a jump to values above 6000. There is no way to cover the sensor carefully to reach any value in between 250 and 6000. The readout just jumps between these two extremes.
- if you decrease the intensity of the ambient light (e.g. by turning down the sun...) you can achieve values as low as 1000 or 2000. But there is always this huge step bewteen 250 and the higher value.
I oberserved exactly the same behaviour with the stock ROM and with the CM ROM from crpalmer.
If there is a way to change the sensor readout, that would be great. I cannot imagine that it is an inherent property of the physical sensor. If so it is just badly engineered