Hi Marco

On 12.11.2013 12:49, Marco Chen wrote:
> Hi all,
> 
> [1] shows the properties of power manager (WebAPI) and 
> PowerManager.screenEnabled didn't have a suitable name and explanation.
> 
> This property didn't only control enable/disable of the device screen but 
> also the device's power state ("on" or "mem").
> When gaia developer called this API for turning off the screen but he didn't 
> know the system is going to suspend mode too.
> This will cause entire system go into frozen state so the following work that 
> developer expected will not be performed until device is woken up by any 
> wakup source.
> 
> So I suggest to rename this property and split it to two for power state and 
> screen state if necessary.
> ex: PowerManager.requestToSleep (just an example and welcome to new word)

There is already PowerManager.cpuSleepAllowed for keeping the CPU
running. And screen and CPU states are not independent from each other,
so having two completely separate interfaces might be hard to implement.

If we want to change the API, I'd suggest to expose different levels of
power saving, as described in [1].

Best regards
Thomas

[1] http://developer.android.com/reference/android/os/PowerManager.html

> May I know your suggestion?
> 
> [1] https://developer.mozilla.org/en-US/docs/Web/API/PowerManager
> 
> Sincerely yours.
> 
> -------------------------------------
> Marco Chen
> Engineering Manager
> System Team, Device Engineering
> Mozilla Taiwan
> 
> Tel: +886-2-87861100 # 352
> mail: [email protected]
> 
> _______________________________________________
> 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