Roughly. In addition we also have a fairly steep threshold for the target 
brightness. Once we decided to adjust the brightness the result of the device 
light sensor has to change a lot before we consider an adjustment again. This 
is to avoid flickering. This code was hacked together by philikon and myself a 
long time ago. I am pretty sure its all sorts of suboptimal. Improvements are 
very welcome.

Andreas

On Oct 7, 2013, at 11:40 PM, Tsvika <[email protected]> wrote:

> From what I know,
> 
> In FxOS,
> If we have the ambient light sensor in the device, the screen_manager.js can 
> add an event listener named "devicelight" to do the automatic brightness.
> 
> Once the light sensor reports the value has changed,
> 
> the code will finally go to a function "transitionBrightness".
> 
> To ensure my understanding is correct, this function will keep looping until 
> the difference between the target brightness and screen brightness is smaller 
> than delta. Otherwise, the system will keep adjusting the brightness in this 
> function.
> 
> Is my understanding correct?
> 
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to