Tsvika於 2013年10月8日星期二UTC+8上午5時40分42秒寫道: > 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?
Sorry, here is a misunderstanding. "Once the light sensor reports the value has changed"----> the system keeps polling the value sent from light sensor. The light sensor wont report any value to the system. _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
