Closed Bug 875703 Opened 9 years ago Closed 9 years ago
B2G SMS & MMS: the receiving notification doesn't pop up during the sleep mode
This is inspired by bug 866366, comment #70. Bug 866366 might already solve partial issue. However, we still need to make sure the code path between RIL wake up (when an SMS/MMS is coming) and the calling of .broadcastMessage(...) is also under the protection of CPU wake lock, so the FFOS won't fall into sleep in any way until the notification pops up. Please refer to RadioInterfaceLayer.js for how we handle the in-coming call and also GonkHal.cpp for how we handle RTC alarm. The above-mentioned is just for the Gecko part. Regarding the Gaia part, we probably need to acquire extra wake locks before the system message handler returns. That is, when the system message handler returns, the CPU wake lock will immediately be released if the Gaia end doesn't acquire it own wake locks.
Summary: B2G SMS & MMS: the receiving notification doesn't come up during the sleep mode. → B2G SMS & MMS: the receiving notification doesn't pop up during the sleep mode.
Well, not only common SMS, but for banking/SIM Toolkit SMS there is no notification at all in the list, not sound, not vibration... :-(
This sounds a big issue now. Nominating for leo+.
blocking-b2g: --- → leo?
The bug description might be too implementation-detailed to read. In summary, the symptom reflected on the UI is: users cannot receive SMS/MMS notifications until waking up the device from the sleep mode. The expected behaviours should be: the device can automatically wake itself up and pop up the notification prompt when receiving SMS/MMS. This is not a regression. We've properly handled this for incoming phone calls and the firing alarms, but not yet for receiving SMS/MMS. Need to fix this. I'd appreciate if anyone can help with this and I'm happy to be the mentor/reviewer.
Comment 1 seems to be another problem. Marek, do you see a notification when the phone is in sleep mode ?
(In reply to Gene Lian [:gene] from comment #0) > The above-mentioned is just for the Gecko part. Regarding the Gaia part, we > probably need to acquire extra wake locks before the system message handler > returns. That is, when the system message handler returns, the CPU wake lock > will immediately be released if the Gaia end doesn't acquire it own wake > locks. Gene, in Gaia, we do already use wake locks when we receive a sms through a system message (see activity_handler.js).
Nope. When phone is in sleep mode and it receives bank SMS, there is nothing happening at all. To get at least some notification/info about it, I have to wake it up, unlock and go to the Setting => only then I see full screen notification about bank SMS and not any sooner... :-((
(In reply to Julien Wajsberg [:julienw] from comment #6) > (In reply to Gene Lian [:gene] from comment #0) > > > The above-mentioned is just for the Gecko part. Regarding the Gaia part, we > > probably need to acquire extra wake locks before the system message handler > > returns. That is, when the system message handler returns, the CPU wake lock > > will immediately be released if the Gaia end doesn't acquire it own wake > > locks. > > Gene, in Gaia, we do already use wake locks when we receive a sms through a > system message (see activity_handler.js). Great! Then the CPU wake lock gap might be happening between RIL and broadcastMessage(...). Need to do profiling by printing some timestamps to see when the system falls into sleep. Btw, to reproduce this issue we have to do: 1. Unplug the USB power line. 2. Turn off the screen. to make sure no CPU wake locks are acquired by the system and then send an SMS to it. If the SMS notification doesn't pop up, connecting the USB power line or turning on the screen will activate the notification immediately. Then, we can use adb logcat to check the timestamps to see where the CPU wake lock gap(s) is.
I'm unassigning myself for now, because I cannot reproduce the problem. I'm on Gecko rev c62ea8debbdf btw.
Assignee: tzimmermann → nobody
It seems to be that to make it happen you need that the phone is locked for some time already.
Here is what I did: I closed all running apps, so that they cannot hold any wake locks. I followed the STR from comment 8 and waited for a few seconds. Then I sent an SMS and the phone woke up correctly.
Regular SMS notifications works for me as well, properly. But mentioned bank SMS are unstable, another attempt ended that after unlocking device it opened SIM toolkit menu for me, but without any notion about SMS waiting to be read, but what's even worse => it was refusing bank PIN again and again, until I left the menu (strangely blinking) and entered it again. Even then I've got no new message notification until and navigated to messages and there I saw... new unread message.
Marek, could you please clarify that bank SMS work if you don't lock the device ?
Oh yes, it is, in case of unlocked phone, Settings / SIM Toolkit / Banking menu is opened and alert dialog about new message is there. If left without action, it disappears after a while and returns back to SIM Toolkit menu (one level up, so it is similar to case when I wander there later from sleep mode). I need to say that my old feature phone behaved in similar way, except of that the notification was present immediately (with sound and vibration) on the home screen, even from sleep mode...
Product team: are these 'bank SMS' type messages something we need to be blocking on for v1.1? It sounds like regular SMS notifications work properly in comment 12. Also there might be a dupe bug for this about broadcast notifications - getting the first one and none of the others.
Gene, do you think we still have a bug for normal SMS ?
(In reply to Julien Wajsberg [:julienw] from comment #16) > Gene, do you think we still have a bug for normal SMS ? ni?(gene) Product, we'd still like your input here.
need info to the real Gene. ;)
Flags: needinfo?(clian) → needinfo?(gene.lian)
Oops! Thanks, Julien.
Sorry for the delayed response. Regarding this issue, I cannot reproduce that for a regular SMS. Actually, I originally opened this bug in theory and found out a practical bug at bug 902863, so I directly hightlight this issue based on the reported symptom. Hi Damian, Could you please double check this issue? You used to report the same thing at bug 902863. Right? Need you help to clarify a more stable set of reproducing steps. If it's not reproducing, we have to down the priority. Thanks!
Flags: needinfo?(gene.lian) → needinfo?(mozilla)
FTR The wakelock that I talk about in comment 6 were done in bug 865429, so it should be in 1.0.1 too.
Yeap, I know. I'm just worrying about there still exists some CPU wake lock gaps near RIL (in the Gecko), causing a random bug like this. We used to solve this issue for alarms and in-coming calls. Why the SMS notification is still safe? However, I cannot practically reproduce this issue. Maybe it's just working well and it's a no-issue. Anyway, let's wait for Damian's response because he used to be able to reproduce that at bug 902863.
Unless this is a certification issue, it is too late to add this in 1.1. Wilfred, can you make sure this is prioritized in the backlog?
Flags: needinfo?(ffos-product) → needinfo?(wmathanaraj)
Hi, sorry for delay. For me this bug occurs from time to time. It's really hard to reproduce. When I try to reproduce it, f.e. by sending SMS from the internet it works properly. But sometimes I'm receiving msgs from other people and actually notification or sound don't appear. Only when waking the phone up. So, the bug exist for sure, but don't know what are the conditions to reproduce it. I suppose (but this is only a guess), that it occurs when the screen is turned off for longer time. I mean couple of hours.
Solving this at bug 913777.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 913777
You need to log in before you can comment on or make changes to this bug.