Hi all,

> Before system message is dispatched, it would acquire a 30s cpu wake lock. 
> (http://mxr.mozilla.org/mozilla-central/source/dom/messages/SystemMessageInternal.js#120)
> And then sms app on getting the message, it would acquire another 30s cpu 
> wake lock and do the notification.

I don't think this is a good approach because it brings more power consumption 
on the mobile device.
Image that when user put the device in suspend state, it will be wake up at 
least 30 seconds when SMS is coming before going back to suspend.

If every one used this kind of solution to solve their problem then I can 
expect that the time of "Day of Use" on FxOS will become bad.

> For macro's use case, what if we do the same thing from gecko: acquire a wake 
> lock before power button event is dispatching?
> And release the wake lock when 'sizemodechange' is notified?

The power key didn't always mean "go into suspend", we still need to handle 
"sleep menu" by long pressing power key.
So we can't use the approach you proposed. 
 
Thanks,
Sincerely yours.

----- 原始郵件 -----
寄件者: "Alive Kuo" <[email protected]>
收件者: "Julien Wajsberg" <[email protected]>
副本: "Marco Chen" <[email protected]>, "Mozilla mailing list" 
<[email protected]>
寄件備份: 2013 9 月 6 星期五 上午 12:38:43
主旨: Re: [b2g] Moving Power Key Handling from Gaia to Gecko According to Bug 
898707


Julien Wajsberg 於 2013/9/6 上午12:00 寫道:
> What about other things ? For example I can think of when we receive a
> SMS. There are Wakelocks in Gaia and in Gecko, but we still have a
> problem sometimes (we have a bug for this, I don't remember the number)
> and as a result we don't get the notification.

AFAIK, this shall not be the same case.
Get sms -> Fire System Message -> sms app's mozSetMessageHandler -> sms 
requireWakeLock
Before system message is dispatched, it would acquire a 30s cpu wake lock. 
(http://mxr.mozilla.org/mozilla-central/source/dom/messages/SystemMessageInternal.js#120)
And then sms app on getting the message, it would acquire another 30s cpu wake 
lock and do the notification.

Unless we're so unlucky to get all thing done in 30s + 30s…


For macro's use case, what if we do the same thing from gecko: acquire a wake 
lock before power button event is dispatching?
And release the wake lock when 'sizemodechange' is notified?

> So I think this problem is more general and can't be solved (generally,
> I mean) by moving things from gaia to gecko. (even if in the power case
> this could fix the problem).
> 
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g

Alive C. Kuo, Front end engineer, Mozilla Taiwan
[email protected]




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

Reply via email to