Last Comment Bug 801351 - Remove the SMS and communications background services
: Remove the SMS and communications background services
Status: RESOLVED FIXED
QARegressExclude
:
Product: Firefox OS
Classification: Client Software
Component: Gaia (show other bugs)
: unspecified
: All All
: P1 critical (vote)
: ---
Assigned To: Etienne Segonzac (:etienne)
:
:
Mentors:
Depends on: 816944 805655 814074 818148
Blocks: slim-fast 796904 803935 811087 815384
  Show dependency treegraph
 
Reported: 2012-10-13 15:42 PDT by Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
Modified: 2013-01-13 09:55 PST (History)
31 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
+


Attachments
Test case to check how it is possible to register to sms-received without the sms permission (886 bytes, patch)
2012-10-25 03:25 PDT, Salvador de la Puente González [:salva]
no flags Details | Diff | Splinter Review
Gaia patch to remove the SMS app background service (273.83 KB, patch)
2012-11-09 13:44 PST, Etienne Segonzac (:etienne)
no flags Details | Diff | Splinter Review
Rebased Patch - Removing the SMS background service (271.21 KB, patch)
2012-11-12 06:33 PST, Etienne Segonzac (:etienne)
francisco: review+
Details | Diff | Splinter Review
Patch v3 (273.18 KB, patch)
2012-11-13 10:26 PST, Etienne Segonzac (:etienne)
no flags Details | Diff | Splinter Review
Pointer to gaia PR (464 bytes, text/html)
2012-11-14 05:31 PST, Etienne Segonzac (:etienne)
borja.bugzilla: review-
francisco: approval‑gaia‑v1-
Details
Pointer to gaia pull request (464 bytes, text/html)
2012-11-27 09:07 PST, Etienne Segonzac (:etienne)
21: review+
Details

Description Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-13 15:42:20 PDT
I noticed in background_service.js that

    var backgroundOutOfProcessBlackList = [
      'Messages',

      // XXX: https://bugzilla.mozilla.org/show_bug.cgi?id=783066
      'Communications'
    ];

.  However, SMS should be using system messages now, so I don't quite understand what the background service does.

Similarly, what function does the communications background service perform?

Also, if the comm service has a purpose, then bug 783066 has been fixed for a very long time, so no need to blacklist it.
Comment 1 Etienne Segonzac (:etienne) 2012-10-15 03:38:21 PDT
The Communications app does not use a background service anymore, so we can definitely remove it from the list.

But I'm afraid the SMS app is still using one...
Comment 2 Borja Salguero [:borjasalguero] 2012-10-15 03:47:02 PDT
SMS App is using it due to:
https://bugzilla.mozilla.org/show_bug.cgi?id=782489
There were a discussion about the usage of System Message for SMS, owing to the implications of changing it (not only for SMS App, also for 'Cost-control' one) they decided to keep the current behaviour for V1, and include the patch in Gecko for having this System Message mechanism available. Probably you could talk with Mounir or Jonas about the final decision about it.
Comment 3 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-15 12:19:03 PDT
Bug 782489 was fixed and landed.  Can you explain more about why we're not using that code?
Comment 4 Borja Salguero [:borjasalguero] 2012-10-15 13:06:12 PDT
https://bugzilla.mozilla.org/show_bug.cgi?id=782489 was landed, but as you can see in the discussion this code keeps both mechanism for notifying incoming sms (event subscription and system messages). So this patch only add a new way for being notified (we could use it or not, but is not mandatory). This is not a problem, but Cost Control works on this way. As there is no final decision (and only using system message will not work properly for Cost-Control) we have kept background services for V1.
Comment 5 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-18 10:31:59 PDT
Hi Borja,

Sorry, but I don't see any arguments here for not removing the service except for inertia.  That's a fair argument, but unfortunately memory consumption and startup time is pretty close to the #1 complaint we're getting from HW vendors right now.  Removing these useless services will save us 2-4MB, which is one of the biggest easy memory wins we have available.

We need to find resources to fix this.
Comment 6 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-18 10:34:12 PDT
Note, removing the services here will be a memory win that doesn't require bug 775997.
Comment 7 Borja Salguero [:borjasalguero] 2012-10-18 13:19:20 PDT
Hi Chris,
For sure that removing background services it's a good idea (totally agree) but there were some concerns about using System Messages in SMS  (that's why there was a large discussion about it and that's why we are keeping in Backend both methods of notification). 
AFAIK if we use system messages, every time we receive a SMS we will launch all the apps that are listening this message without any policy, and 'cost control' doesn't require to be launched if a SMS is received (only needs to store data and statistics for showing it on demand). The concept of System Message (at least in my opinion) needs a review, or at least we should specify a policy for using it. For example, if you create an App which listen to 'incoming-call' system message, and this app uses the attention screen, every time you receive a call you are gonna launch two apps, dialer and our new app. In this case we are going to have a race condition  (attention screen is a resource that is used at the same time for two apps...) because we have no policy about which app should be launched or not. 
We should confirm with Backend team which is the best way of doing it, and if there is any decision about using system message or not in SMS. Because if there is, backend should remove one of the method for being notified of an incoming sms.
Comment 8 Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-10-18 17:12:16 PDT
I'm a little unclear on what the current status of things are.

There was some discussion about if we should keep the DOM Events or not, in addition to having the system messages. We made the decision to keep the DOM Events since system messages can't yet solve all our current usecases. Specifically the Cost-control app can't use system messages.

This is the decision that we have made for v1. We might change things in v2 by improving system messages such that they can be used by the cost-control app, but that's not something we should worry about now.

But I didn't think anyone was using the background service any more. Is that not correct? I thought that the communications app used plain system messages and the cost-control app used plain DOM events.
Comment 9 Andrew Overholt [:overholt] 2012-10-18 17:17:59 PDT
Josh, can you help us out here?
Comment 10 Borja Salguero [:borjasalguero] 2012-10-19 00:30:45 PDT
IMHO I think that the best option (for avoiding make all regression tests again, and focusing in other things that are bugs -SMS it's working with DOM Events paradigm and will be working while cost-control does-) could be opening a non-blocking bug for updating SMS App to System Message as Vivien suggested https://bugzilla.mozilla.org/show_bug.cgi?id=782489#c23 . As soon as we fix all bugs where we are working on, we will address this functionality in SMS App.
Comment 11 Mike Connor [:mconnor] 2012-10-19 08:44:01 PDT
Triage call: We are not going to block on this bug, as this specific case is not a requirement to ship on its own merits.  Memory usage is an important issue, so we will consider a patch on a risk/reward basis, but we will not block on individual "make X better" bugs that would not hold the release on their own merits.
Comment 12 Andrew Overholt [:overholt] 2012-10-19 11:16:35 PDT
Assigning to Boris based on comment #10 (even though we've blocking-'d this bug).
Comment 13 Andreas Gal :gal 2012-10-19 11:20:52 PDT
This is a huge chunk of memory that we can't reclaim. I don't think we can afford not removing the background service. cjones?
Comment 14 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-20 16:52:24 PDT
Since as you say cost control only needs the SMS data on demand, why would it even try listen to incoming DOM events or system messages?  It should only look up messages to the magic number in the SMS database when the information is needed.

And then we need to add a hack in the SMS app to ignore messages from that magic number, but whatever.
Comment 15 Salvador de la Puente González [:salva] 2012-10-22 03:28:57 PDT
Hello

I was on vacations so I did not see this thread until now.

First, one remark. Despite background black list does not include the Cost Control (CC) application, it is using one. Instead of using `background` manifest field, a "driver" in System application is in charge of loading the CC Service using window.open(), then both widget (at the bottom of the notification tray) and application (running INSIDE THE PROCESS) can communicate with the service. The service performs two main activities: do periodic tasks and keep the synchronization between widget and application.

Now, Cost Control needs SMS to check the balance and to perform the top up operation (to increase the credit). To check the balance is a periodic task (now using timers but this will be replaced by using Alarm API) so CC needs to send a query message from time to time, then it starts to listen for the response SMS and it stops to listen when a timeout value is reached.

The meat: by using system messages and registering the CC app to this message, the message will wake up the application at a moment the user does not require this. And this is a memory issue as well mainly due to two reasons:

  1. As the CC app is registered for every incoming message, the application will be opened when it is not needed forcing itself to close when the message is not intended to be received by the CC app. So it consumes memory for nothing.

  2. If the message is indeed a CC message, the application is raised for a very short **user time** or when it was not even needed (ok, you can argue B2G will close it in the future but this implicates other problems related with its INSIDE THE PROCESS nature).
Comment 16 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-22 13:13:49 PDT
I don't understand why the cost control application needs to listen to incoming SMSes.  Can someone explain that?

If we make the cost control application *not* listen to incoming SMSes, then that resolves everyone's concerns.  Right?
Comment 17 Salvador de la Puente González [:salva] 2012-10-23 01:44:28 PDT
As said before, CC app needs to send a credit request every hour, then it waits for the response SMS and parse it in order to get the current credit.
Comment 18 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-23 14:56:22 PDT
It doesn't need to immediately parse the response.  It only needs to parse it when the value needs to be shown somewhere.  To do so, all it needs to do is query the SMS database.
Comment 19 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-23 17:08:22 PDT
Just so we're all on the same page, here's my proposal
 - stop having the communications server listen for incoming SMS
 - have only the SMS app listen the incoming-sms system message
 - have cost control send its "poll usage data" message off an alarm (sounds like this is already planned)
 - when cost control UI needs latest usage data, query the SMS DB for messages received from the magic number
 - add a hack to the SMS app to ignore messages received from the magic number
 - remove the parts of the "control control service" and "SMS service" that are always loaded

This gets the code into a state where both can be moved OOP, but that's orthogonal.
Comment 20 Salvador de la Puente González [:salva] 2012-10-24 01:20:56 PDT
(In reply to Chris Jones [:cjones] [:warhammer] from comment #19)
> Just so we're all on the same page, here's my proposal
>  - stop having the communications server listen for incoming SMS
>  - have only the SMS app listen the incoming-sms system message

Just a question here. AFAIK, if we register our application to listen for 'sms-received', we will launched every time a message is received. What happen with the SMS permission?

>  - have cost control send its "poll usage data" message off an alarm (sounds
> like this is already planned)

This is planned. Ok.

>  - when cost control UI needs latest usage data, query the SMS DB for
> messages received from the magic number

Technically possible. This can introduce a little issue: for testing, CC SMSes are not being deleted after parsing but it is a must if don't want to saturate the SMS database. With the new approach I can not distinguish what of those messages were queried by CC app or what of them were queried by the user.

>  - add a hack to the SMS app to ignore messages received from the magic
> number

This concurs in another problem. The black-list of SMS application is the white-list of CC application. Note what amount of useless work we are doing here:

- Each time a message is received, both CC and SMS applications will wake and load. The CC application will kill itself and the SMS application will be launched every time the message is not a credit message. Or, the CC applications stands and the SMS application kill itself every time the SMS is a credit-related one (hourly with the current implementation).

>  - remove the parts of the "control control service" and "SMS service" that
> are always loaded

I'm going to talk with Vivien about this today. This is not as simple as it could seem and it is related with https://bugzilla.mozilla.org/show_bug.cgi?id=799634

> 
> This gets the code into a state where both can be moved OOP, but that's
> orthogonal.

As said, for Cost Control is more coupled that it seems at first glance.
Comment 21 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-24 01:47:52 PDT
Let me make sure you understand what this work is intended to buy us.  It's not a semantic refactoring, for semantics' sake.  It's to save a constant locked 2-4MB of memory in the main b2g process, that can never be freed up.  Relatedly, because the SMS service is so coupled currently with the cost control application, it's additionally to save 10MB+ locked up by the SMS app when it's loaded in process, which can never be freed up.

Memory usage is one of the two biggest concerns (along with startup time) from downstream partners about the b2g v1 product.

(In reply to Salvador de la Puente González [:salva] from comment #20)
> (In reply to Chris Jones [:cjones] [:warhammer] from comment #19)
> > Just so we're all on the same page, here's my proposal
> >  - stop having the communications server listen for incoming SMS
> >  - have only the SMS app listen the incoming-sms system message
> 
> Just a question here. AFAIK, if we register our application to listen for
> 'sms-received', we will launched every time a message is received. What
> happen with the SMS permission?
> 

I don't understand this question.

> >  - when cost control UI needs latest usage data, query the SMS DB for
> > messages received from the magic number
> 
> Technically possible. This can introduce a little issue: for testing, CC
> SMSes are not being deleted after parsing but it is a must if don't want to
> saturate the SMS database. With the new approach I can not distinguish what
> of those messages were queried by CC app or what of them were queried by the
> user.
> 

I don't understand this.  Are SMS's to magic number ever deleted by CC currently or not?

> - Each time a message is received, both CC and SMS applications will wake
> and load.

Nope.  CC never receives incoming SMS.

> > 
> > This gets the code into a state where both can be moved OOP, but that's
> > orthogonal.
> 
> As said, for Cost Control is more coupled that it seems at first glance.

The SMS service and cost control are already tightly coupled.  If they weren't, we would have no work to do here! :)
Comment 22 Salvador de la Puente González [:salva] 2012-10-24 02:19:24 PDT
(In reply to Chris Jones [:cjones] [:warhammer] from comment #21)
> Let me make sure you understand what this work is intended to buy us.  It's
> not a semantic refactoring, for semantics' sake.  It's to save a constant
> locked 2-4MB of memory in the main b2g process, that can never be freed up. 
> Relatedly, because the SMS service is so coupled currently with the cost
> control application, it's additionally to save 10MB+ locked up by the SMS
> app when it's loaded in process, which can never be freed up.
> 
> Memory usage is one of the two biggest concerns (along with startup time)
> from downstream partners about the b2g v1 product.
> 
> (In reply to Salvador de la Puente González [:salva] from comment #20)
> > (In reply to Chris Jones [:cjones] [:warhammer] from comment #19)
> > > Just so we're all on the same page, here's my proposal
> > >  - stop having the communications server listen for incoming SMS
> > >  - have only the SMS app listen the incoming-sms system message
> > 
> > Just a question here. AFAIK, if we register our application to listen for
> > 'sms-received', we will launched every time a message is received. What
> > happen with the SMS permission?
> > 
> 
> I don't understand this question.

Suppose I'm registered to 'sms-received' but I don't declare SMS permission on the manifest. Am I allowed to handle input messages? If so, there is a semantic inconsistency because I have not the SMS permission.

> 
> > >  - when cost control UI needs latest usage data, query the SMS DB for
> > > messages received from the magic number
> > 
> > Technically possible. This can introduce a little issue: for testing, CC
> > SMSes are not being deleted after parsing but it is a must if don't want to
> > saturate the SMS database. With the new approach I can not distinguish what
> > of those messages were queried by CC app or what of them were queried by the
> > user.
> > 
> 
> I don't understand this.  Are SMS's to magic number ever deleted by CC
> currently or not?

Currently, CC is not deleting any message but it should do it to prevent filling the SMS database. Do you understand?

> > - Each time a message is received, both CC and SMS applications will wake
> > and load.
> 
> Nope.  CC never receives incoming SMS.

Ok. I see, then only SMS application.

> 
> > > 
> > > This gets the code into a state where both can be moved OOP, but that's
> > > orthogonal.
> > 
> > As said, for Cost Control is more coupled that it seems at first glance.
> 
> The SMS service and cost control are already tightly coupled.  If they
> weren't, we would have no work to do here! :)

No, the problem is not with the SMS application. The problem is related with the synchronization between the CC widget on the notification tray and the CC application. Coupling is with System app not with SMS.
Comment 23 Salvador de la Puente González [:salva] 2012-10-24 02:24:06 PDT
I understand what is the goal for this. Indeed, the problem with CC is not to remove the DOM API for SMS. Your suggestion is possible and I think there should be some walk around to handle the problem of deleting useless SMS.

My concern is more related with turning CC into OOP. I see the integrity, security and memory implications of keeping CC not OOP but I think this is another different problem than that we are discussing now.
Comment 24 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-24 02:37:09 PDT
(In reply to Salvador de la Puente González [:salva] from comment #22)
> (In reply to Chris Jones [:cjones] [:warhammer] from comment #21)
> > (In reply to Salvador de la Puente González [:salva] from comment #20)
> > > (In reply to Chris Jones [:cjones] [:warhammer] from comment #19)
> > > > Just so we're all on the same page, here's my proposal
> > > >  - stop having the communications server listen for incoming SMS
> > > >  - have only the SMS app listen the incoming-sms system message
> > > 
> > > Just a question here. AFAIK, if we register our application to listen for
> > > 'sms-received', we will launched every time a message is received. What
> > > happen with the SMS permission?
> > > 
> > 
> > I don't understand this question.
> 
> Suppose I'm registered to 'sms-received' but I don't declare SMS permission
> on the manifest. Am I allowed to handle input messages? If so, there is a
> semantic inconsistency because I have not the SMS permission.
> 

No.

> > 
> > > >  - when cost control UI needs latest usage data, query the SMS DB for
> > > > messages received from the magic number
> > > 
> > > Technically possible. This can introduce a little issue: for testing, CC
> > > SMSes are not being deleted after parsing but it is a must if don't want to
> > > saturate the SMS database. With the new approach I can not distinguish what
> > > of those messages were queried by CC app or what of them were queried by the
> > > user.
> > > 
> > 
> > I don't understand this.  Are SMS's to magic number ever deleted by CC
> > currently or not?
> 
> Currently, CC is not deleting any message but it should do it to prevent
> filling the SMS database. Do you understand?
> 

Yes.  So, that's an orthogonal bug then, right?

Although, I thought we might be keeping old messages around for a billing cycle or so to display historical graphs of data usage.  But still, that's an orthogonal bug.
Comment 25 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-24 02:38:31 PDT
(In reply to Salvador de la Puente González [:salva] from comment #23)
> My concern is more related with turning CC into OOP. I see the integrity,
> security and memory implications of keeping CC not OOP but I think this is
> another different problem than that we are discussing now.

I'm not sure that I understand this.  Can you explain more about what you're worried about?
Comment 26 Mounir Lamouri (:mounir) 2012-10-24 02:46:53 PDT
(In reply to Salvador de la Puente González [:salva] from comment #22)
> Suppose I'm registered to 'sms-received' but I don't declare SMS permission
> on the manifest. Am I allowed to handle input messages? If so, there is a
> semantic inconsistency because I have not the SMS permission.

You can't even register to "sms-received" if you do not have SMS permission. To register to that event, you need to have access to navigator.mozSms which will not be the case if the app doesn't have the SMS permission.
Comment 27 Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-10-24 16:19:53 PDT
(In reply to Chris Jones [:cjones] [:warhammer] from comment #19)
> Just so we're all on the same page, here's my proposal
>  - stop having the communications server listen for incoming SMS
>  - have only the SMS app listen the incoming-sms system message
>  - have cost control send its "poll usage data" message off an alarm (sounds
> like this is already planned)
>  - when cost control UI needs latest usage data, query the SMS DB for
> messages received from the magic number

What problem are you trying to solve with the above? Note that the cost control app can simply use a DOM event to be notified any time a SMS message is received. That way the cost control app doesn't get woken up every time there's an incoming SMS, but if it's already running it can update it's current state.

On startup it could either use the latest stored value since that will only be wrong if the cost control app was closed/crashed in the short timespan between when it sent a "please tell me remaining money" message and the resulting "here's how much money is left" message. And it would only be out-of-date until the next update.

I believe that this is how the cost control app already works, but I'm not fully sure about that.

>  - add a hack to the SMS app to ignore messages received from the magic
> number

This sounds ok to me. It could even delete it from the database right away if the do the above.

>  - remove the parts of the "control control service" and "SMS service" that
> are always loaded

Agreed.
Comment 28 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-24 16:45:52 PDT
(In reply to Jonas Sicking (:sicking) from comment #27)
> (In reply to Chris Jones [:cjones] [:warhammer] from comment #19)
> >  - when cost control UI needs latest usage data, query the SMS DB for
> > messages received from the magic number
> 
> What problem are you trying to solve with the above?

"How do I get usage data if I'm not listening to every incoming SMS."

> Note that the cost
> control app can simply use a DOM event to be notified any time a SMS message
> is received. That way the cost control app doesn't get woken up every time
> there's an incoming SMS, but if it's already running it can update it's
> current state.
> 
> On startup it could either use the latest stored value since that will only
> be wrong if the cost control app was closed/crashed in the short timespan
> between when it sent a "please tell me remaining money" message and the
> resulting "here's how much money is left" message. And it would only be
> out-of-date until the next update.
> 

This is all fine, and mostly orthogonal I think.
Comment 29 Jonas Sicking (:sicking) No longer reading bugmail consistently 2012-10-24 20:36:01 PDT
(In reply to Chris Jones [:cjones] [:warhammer] from comment #28)
> > What problem are you trying to solve with the above?
> 
> "How do I get usage data if I'm not listening to every incoming SMS."

My suggested solution only makes the cost control app listen to every incoming SMS as long as the cost control app is running. If that is not acceptable, could you elaborate on why?
Comment 30 Salvador de la Puente González [:salva] 2012-10-25 01:05:43 PDT
(In reply to Jonas Sicking (:sicking) from comment #27)
> I believe that this is how the cost control app already works, but I'm not
> fully sure about that.

Yes, exactly. The only problem is now the CC application is not OOP and it's started with system and kept opened. This is why I'm discussing with Vivien.

> This sounds ok to me. It could even delete it from the database right away
> if the do the above.

Now is working in this way. There is a blacklist.

> >  - remove the parts of the "control control service" and "SMS service" that
> > are always loaded
> 
> Agreed.

This is part of https://bugzilla.mozilla.org/show_bug.cgi?id=799634

Solution proposed by [:cjones] to remove listeners is technically acceptable (this does not mean it is feasible for V1, it needs a double-check) but the remark introduced by [:sicking] is valid as well and a strong argument to keep this implementation for V1 at least.

Please, there are some problems with system messages, let's focus on that instead of Cost Control OOP problems. Borja and I are reviewing some issues related with system messages. I'll post a summary soon.
Comment 31 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-25 02:16:33 PDT
(In reply to Jonas Sicking (:sicking) from comment #29)
> (In reply to Chris Jones [:cjones] [:warhammer] from comment #28)
> > > What problem are you trying to solve with the above?
> > 
> > "How do I get usage data if I'm not listening to every incoming SMS."
> 
> My suggested solution only makes the cost control app listen to every
> incoming SMS as long as the cost control app is running. If that is not
> acceptable, could you elaborate on why?

I think you were proposing the same essential thing I was plus listening to incoming SMS while cost control is running.  I don't have any evidence the latter part is important, but it doesn't seem harmful.  Hence, mostly orthogonal ;).
Comment 32 Salvador de la Puente González [:salva] 2012-10-25 03:25:22 PDT
Created attachment 675038 [details] [diff] [review]
Test case to check how it is possible to register to sms-received without the sms permission

With this patch, `sms` permission is removed and `sms-received` system message is added. A simple callback to dump SMS information is registered. With latest build, this is completely possible:

> E/GeckoConsole(  709): Content JS LOG at app://sms.gaiamobile.org/js/background.js:6 in anonymous: {"id":1,"delivery":"received","sender":"800186","receiver":{},"body":"Asdf","timestamp":1351156177000,"read":false}

> E/GeckoConsole(  841): Content JS LOG at app://sms.gaiamobile.org/js/background.js:6 in anonymous: {"id":2,"delivery":"received","sender":"800186","receiver":{},"body":"1234","timestamp":1351156460000,"read":false}

> E/GeckoConsole(  987): Content JS LOG at app://sms.gaiamobile.org/js/background.js:6 in anonymous: {"id":1,"delivery":"received","sender":"800186","receiver":{},"body":"DEADBEEF","timestamp":1351157221000,"read":false}

Please :cjones, :mounir, can you double check this?
Comment 33 Mounir Lamouri (:mounir) 2012-10-25 09:01:51 PDT
Oh... that is using the System Messages. Fabrice, do we have any permission checks for system messages? That scares me. That means any system message is readable by any app?
Comment 34 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-25 12:15:25 PDT
Thanks for finding this Salva!

Let's stay focused on removing the services in this bug, and work on comment 32 in another.
Comment 35 Mounir Lamouri (:mounir) 2012-10-25 15:54:09 PDT
(In reply to Chris Jones [:cjones] [:warhammer] from comment #34)
> [...] and work on comment 32 in another.

bug 805655

And indeed, thanks for finding this Salvador, could have been very painful to find it later.
Comment 36 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-25 16:00:18 PDT
+1
Comment 37 Salvador de la Puente González [:salva] 2012-10-26 01:00:57 PDT
Thanks to Borja.

He was who points me this could happen. Indeed, he discovered this because it is happening with the message for incoming calls too.
Comment 38 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-10-26 02:05:23 PDT
This is the only "different phone" win we have left in gaia.
Comment 39 Etienne Segonzac (:etienne) 2012-11-09 13:44:03 PST
Created attachment 680231 [details] [diff] [review]
Gaia patch to remove the SMS app background service

Looks like if we kill the sms app we then have DOMAppRegistry getSelf **** out during the next system message callback.

will investigate a bit more when I get cell reception.
Comment 40 Etienne Segonzac (:etienne) 2012-11-09 14:00:29 PST
(In reply to Etienne Segonzac (:etienne) from comment #39)
> Created attachment 680231 [details] [diff] [review]
> Gaia patch to remove the SMS app background service
> 
> Looks like if we kill the sms app we then have DOMAppRegistry getSelf
> **** out during the next system message callback.
> 
> will investigate a bit more when I get cell reception.

Looks like it's working well, got all the smses, and only once, even with an app kill in the middle \o/
Comment 41 Etienne Segonzac (:etienne) 2012-11-12 06:33:43 PST
Created attachment 680614 [details] [diff] [review]
Rebased Patch - Removing the SMS background service
Comment 42 Francisco Jordano [:arcturus] [:francisco] 2012-11-12 06:52:36 PST
Comment on attachment 680614 [details] [diff] [review]
Rebased Patch - Removing the SMS background service

Review of attachment 680614 [details] [diff] [review]:
-----------------------------------------------------------------

r+ just one thing, should we remove the l10n strings that we won't be using like 'alert-tones'?

Perhaps we could do that for all apps automagically.
Comment 43 Borja Salguero [:borjasalguero] 2012-11-13 03:03:44 PST
[:etienne] Could you confirm us that 'system message' will not be available for 'not certified' Apps until V2? I would like  to be sure that this 'system-message' is not gonna be used for any other 'SMS' App of a third party until V2.
Comment 44 Etienne Segonzac (:etienne) 2012-11-13 06:33:09 PST
(In reply to Borja Salguero [:borjasalguero] from comment #43)
> [:etienne] Could you confirm us that 'system message' will not be available
> for 'not certified' Apps until V2? I would like  to be sure that this
> 'system-message' is not gonna be used for any other 'SMS' App of a third
> party until V2.

Fabrice, any idea?

That said I'm not sure it's relevant to this patch since gecko is already sending those system messages whether the SMS app use them or not.
Comment 45 [:fabrice] Fabrice Desré 2012-11-13 09:51:28 PST
We don't limit system messages to certified apps. Any app can register system message handlers and we'll happily send it messages if you use the broadcast mechanism.

If you want to control which app receives a message, use sendMessage() instead. This is what the alarm and web activities APIs are doing.
Comment 46 Etienne Segonzac (:etienne) 2012-11-13 10:26:02 PST
Created attachment 681108 [details] [diff] [review]
Patch v3

Encountered 2 issues while dogfooding with this patch:
- bad contact lookup
- sometimes 2 notifications instead of one

This updated patch fixes both.
Comment 47 Borja Salguero [:borjasalguero] 2012-11-13 15:48:48 PST
Hi there, some issues.

[:fabrice] Let other third party apps being subscribed to 'system-message' would be a problem with memory comsuption. If we are removing 'background' service for saving memory, and with 'system-message' Im gonna open all apps subscribed with no criteria, memory comsuption will suffer a huge peak every time we receive a SMS... How are we going to handle it?

[:etienne] The code looks great! Only one thing. As we are moving this code from background to 'system-message' handler, could you add this fix as well? https://bugzilla.mozilla.org/show_bug.cgi?id=803935
The scenario will be that if you receive an email and your visibility is true, you dont have to create a notification. Please add this small fix and for me would be r+. Thanks for your support with SMS App!
Comment 48 Borja Salguero [:borjasalguero] 2012-11-13 15:52:05 PST
[:etienne] Even scenario is more simpler. If you receive a SMS while you are inside the thread --> NO notifications. For other scenarios, we will show notifications keeping the code. Thanks!!
Comment 49 [:fabrice] Fabrice Desré 2012-11-13 16:05:22 PST
(In reply to Borja Salguero [:borjasalguero] from comment #47)
> Hi there, some issues.
> 
> [:fabrice] Let other third party apps being subscribed to 'system-message'
> would be a problem with memory comsuption. If we are removing 'background'
> service for saving memory, and with 'system-message' Im gonna open all apps
> subscribed with no criteria, memory comsuption will suffer a huge peak every
> time we receive a SMS... How are we going to handle it?

As I said in comment 45, we can limit which app receives a system message. It's an SMS API design choice to broadcast or not, not an issue with the System Messages API itself. What we plan to do though, is to only let apps that have the permission to access e.g. the SMS API to receive SMS related system messages. This is tracked in bug 805655
Comment 50 Etienne Segonzac (:etienne) 2012-11-14 05:31:51 PST
Created attachment 681456 [details]
Pointer to gaia PR
Comment 51 Francisco Jordano [:arcturus] [:francisco] 2012-11-14 07:44:44 PST
Comment on attachment 681456 [details]
Pointer to gaia PR

Looking good to me, just waiting for Borja review.

As Fabrice commented, lets fix this system message thing, and in other bug we'll ensure the message can be received by the proper apps.

Thanks folks.
Comment 52 Francisco Jordano [:arcturus] [:francisco] 2012-11-14 09:36:10 PST
Comment on attachment 681456 [details]
Pointer to gaia PR

After checking with :etienne and :fbsc i'm setting the a=- they have raised a problem with notifications.

If the app is killed the callback is gc and we cannot launch the thread from the notifications. :etienne has pointed out that is a common problem with notifications so we will need to figure out a way of solving it before merging this changes.

Cheers!
Comment 53 Etienne Segonzac (:etienne) 2012-11-14 09:37:37 PST
Update: the gaia work is done, reviewed and can be found here:
https://github.com/mozilla-b2g/gaia/pull/6400

But we're facing a dilemma.

When a new SMS comes in we create a mozNotification with a click callback that basically does a mozApps.mgmt.getSelf(launch()).

In the current implementation the SMS background service does this.
- The good thing is that clicking the SMS notification always takes you to the SMS app.
- The bad thing is that the SMS background service is always running and using our precious memory

In the new implementation the SMS app creates the notification itself.
- The good thing is that we're freeing a lot of memory by removing the background service.
- The bad thing is when the SMS app is closed we're losing the notification click callback, and taping the notification will do nothing, which is a bad experience.

What should we do?
Comment 54 Borja Salguero [:borjasalguero] 2012-11-14 09:40:26 PST
Please address the comments in the PR. Thanks!
Comment 55 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-11-14 11:38:09 PST
(In reply to Francisco Jordano [:arcturus] from comment #52)
> Comment on attachment 681456 [details]
> Pointer to gaia PR
> 
> After checking with :etienne and :fbsc i'm setting the a=- they have raised
> a problem with notifications.
> 
> If the app is killed the callback is gc and we cannot launch the thread from
> the notifications. :etienne has pointed out that is a common problem with
> notifications so we will need to figure out a way of solving it before
> merging this changes.
> 
> Cheers!

This is a much bigger problem than just this application actually. Dialer, Calendar and potentially email will suffer this too. So I guess we need a way to workaround that globally.

Also I don't really know why this bug has been set blocking-. Let's renom it.

This bug is about saving 6mb of RAM in a permanent fashion on the device. It also one of the 2 pieces that miss that would let us get rid of background service.
Comment 56 Borja Salguero [:borjasalguero] 2012-11-14 11:40:41 PST
I agree that we are going to save 6Mb, but we cant save Mb breaking other functionalities... Do we need to open a bug for creating the 'workaround' that you mention and block this bug until the workaround will be available?
Comment 57 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-11-14 11:47:25 PST
(In reply to Borja Salguero [:borjasalguero] from comment #56)
> I agree that we are going to save 6Mb, but we cant save Mb breaking other
> functionalities... 

I have not said that.

> Do we need to open a bug for creating the 'workaround'
> that you mention and block this bug until the workaround will be available?

I would like to raise this issue to some of our platform folks.

cjones, sicking, dougt?
Comment 58 Francisco Jordano [:arcturus] [:francisco] 2012-11-14 14:38:38 PST
(In reply to Vivien Nicolas (:vingtetun) from comment #55)
> (In reply to Francisco Jordano [:arcturus] from comment #52)
> > Comment on attachment 681456 [details]
> > Pointer to gaia PR
> > 
> > After checking with :etienne and :fbsc i'm setting the a=- they have raised
> > a problem with notifications.
> > 
> > If the app is killed the callback is gc and we cannot launch the thread from
> > the notifications. :etienne has pointed out that is a common problem with
> > notifications so we will need to figure out a way of solving it before
> > merging this changes.
> > 
> > Cheers!
> 
> This is a much bigger problem than just this application actually. Dialer,
> Calendar and potentially email will suffer this too. So I guess we need a
> way to workaround that globally.

Yup, totally agree, is not just SMS, is potentially, any app using the notifications.

> 
> Also I don't really know why this bug has been set blocking-. Let's renom it.

Agree again, should be a b+, but we don't have a solution yet for the problem of notifications not working when the app is killed (which happens to be an excellent name for a bug).

> 
> This bug is about saving 6mb of RAM in a permanent fashion on the device. It
> also one of the 2 pieces that miss that would let us get rid of background
> service.

:vingtetun, what about open a new bug for solving the notifications problem, putting this as dependent and let the flow go?

My only concern is if we land this right now, despite of saving 6MB (which I consider a tremendous improvement) we are 'breaking' (yes we are) a functionality, that is not in the smoke test (but could) and at this stages of the project stability is a must.

With that said, I really would like to hear the opinion of the platform gurus as well :)

Thanks!
Comment 59 [:fabrice] Fabrice Desré 2012-11-14 15:04:34 PST
Can't the notifications click callbacks just be closures that launch activities received by their respective app?

This sounds too simple so I'm probably missing something!
Comment 60 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-11-14 15:23:45 PST
I'm very surprised that clicking notifications doesn't launch() the app that created them, and I agree with comment 55.

Can we change that easily in gaia?
Comment 61 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-11-14 15:25:44 PST
(In reply to Chris Jones [:cjones] [:warhammer] from comment #60)
> Can we change that easily in gaia?

If we can't, then we should still remove the background service.  The SMS app will be launched when it receives an SMS, and it will most likely still be running when the user taps the notification (with all the other memory savings we have lined up).  If the SMS app is killed for some reason, then the workaround is to just tap the SMS app icon to launch it.  I consider that a polish bug.
Comment 62 Rafael Rebolleda 2012-11-15 01:04:13 PST
Hey guys, 

I can't follow the technical discussion all the way to the bottom, but one thing is pretty clear to me: having a broken notification that might not act on a user's tap is *totally* unacceptable.

Whatever app / system responsible for displaying a notification must make sure tapping it will *always* open the app as expected.
Comment 63 Etienne Segonzac (:etienne) 2012-11-15 02:52:56 PST
(In reply to Fabrice Desré [:fabrice] from comment #59)
> Can't the notifications click callbacks just be closures that launch
> activities received by their respective app?
> 
> This sounds too simple so I'm probably missing something!

I don't think we have the ability to make zombie-closures outliving the app window :)
Comment 64 Etienne Segonzac (:etienne) 2012-11-15 03:19:54 PST
(In reply to Chris Jones [:cjones] [:warhammer] from comment #60)
> I'm very surprised that clicking notifications doesn't launch() the app that
> created them, and I agree with comment 55.
> 
> Can we change that easily in gaia?

Currently Gaia doesn't know which app sent the notification, we get a mozChromeEvent looking like this:

{"type":"desktop-notification","id":"alert0","icon":"app://sms.gaiamobile.org/style/icons/60/Sms.png","title":"+336XXXXXXX","text":"Plop"}

If we add  the same |url| and |manifestURL| fields than the open-app mozChromeEvent the gaia system app could ensure that the sending app is at least launched (which will probably be acceptable UX wise).
Comment 65 Salvador de la Puente González [:salva] 2012-11-15 05:08:48 PST
The problem is not the callback is collected by the GC, the problem is that the memory of the process has been completely wiped out. Doesn't it?

But please, explain me something I don't understand. Suppose we were keeping the process alive, the notification object created by `mozNotification.createNotification()` has an attribute `onclick` with a callback and this callback is invoked by the system running in another process. How is this possible? In terms of low level implementation, what is a reference to a function? Some kind of pair (<number of the process>, <pointer to the function>)?

Now, returning to the discussion. Suppose we leave the background process, but with the registration of the system message handler instead of listening through the DOM API. Why this approach, which does not even open the application (so, it does not load any resource neither) can occupy 6MiB? It can not be the closure in background.js Is it the background iframe overhead? I hope no but I don't know.

With this, the user could not close the SMS application completely (he could close the SMS iframe in the card view, releasing the resources, but not the service itself). Furthermore, the OOM killer could still kill the SMS application if device is out of memory. Am I wrong?
Comment 66 Etienne Segonzac (:etienne) 2012-11-15 06:11:20 PST
Fabrice do you think bug 778668 can be resurected?
Comment 67 Rafael Rebolleda 2012-11-15 07:16:14 PST
Launching the app itself is not enough, IMHO. We should strive to keep the notification in context and jump to the thread, email, etc. it refers to. Not doing so might feel reasonable a priori, but it'll be an utter pain in two days of use.
Comment 68 Etienne Segonzac (:etienne) 2012-11-15 07:57:54 PST
(In reply to Rafael Rebolleda [:rafaelrebolleda] from comment #67)
> Launching the app itself is not enough, IMHO. We should strive to keep the
> notification in context and jump to the thread, email, etc. it refers to.
> Not doing so might feel reasonable a priori, but it'll be an utter pain in
> two days of use.

I don't think creating a background service for each app using the desktop notifications API is technically reasonable either...

Launching the app sounds like a good compromise, the app can be smart and save its state in order to be launched on the good screen.
Comment 69 Etienne Segonzac (:etienne) 2012-11-15 08:03:17 PST
(In reply to Salvador de la Puente González [:salva] from comment #65)
> Why this approach, which does not even open the
> application (so, it does not load any resource neither) can occupy 6MiB? It
> can not be the closure in background.js Is it the background iframe
> overhead? I hope no but I don't know.
> 

The background service's iframe spins another process, which is about 6MB I've been told.
Comment 70 Salvador de la Puente González [:salva] 2012-11-15 08:08:57 PST
(In reply to Etienne Segonzac (:etienne) from comment #69)
> The background service's iframe spins another process, which is about 6MB
> I've been told.

First, I think we need to check this. :borja, can you check the background process really allocates such amount of memory?

Second, if every process allocates 6MiB, then I think we should change Gecko to optimize 'background' iframes because we know (it is in the `background` definition) that those windows open with flag `background` will never be shown. The only thing we need here is the JS machine but correct me I I'm wrong.
Comment 71 Salvador de la Puente González [:salva] 2012-11-15 08:08:57 PST
(In reply to Etienne Segonzac (:etienne) from comment #69)
> The background service's iframe spins another process, which is about 6MB
> I've been told.

First, I think we need to check this. :borja, can you check the background process really allocates such amount of memory?

Second, if every process allocates 6MiB, then I think we should change Gecko to optimize 'background' iframes because we know (it is in the `background` definition) that those windows open with flag `background` will never be shown. The only thing we need here is the JS machine but correct me I I'm wrong.
Comment 72 Rafael Rebolleda 2012-11-15 08:12:43 PST
There is no "good state". For SMS or email, different messages will belong in different threads, and therefore screens. The good screen would only be so if the notification happens to point, by chance, to that thread.

I'm not saying bg service per app kills me; I'm ok with the system handling it as long as functionality and UX are not hindered, which AFAIK is what will happen with the current proposal.
Comment 73 Alex Keybl [:akeybl] 2012-11-15 08:19:26 PST
We need a full summary of the work required to complete this bug before setting blocking-basecamp+. 6mb is a great memory win, but if this requires any major architectural work we may not implement for v1.
Comment 74 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-11-15 08:37:41 PST
(In reply to Alex Keybl [:akeybl] from comment #73)
> We need a full summary of the work required to complete this bug before
> setting blocking-basecamp+. 6mb is a great memory win, but if this requires
> any major architectural work we may not implement for v1.

Alex the architectural discussion about 'Notifications' already affects the Dialer/Calendar/Email and will affect all web apps that are installed and use notifications. So this should happen and is not related *only* to this bug. The decision to use system messages has been made a while ago so I don't think it should be discussed here.

This particular bug is about removing the background service and save us 6mb of RAM. It will also expose the notifications of the SMS app to the same issue that exists for other apps. This issue should be solved globally and blocking this bug won't resolve the issue for the other apps :)
Comment 75 Borja Salguero [:borjasalguero] 2012-11-15 09:04:45 PST
For being consistent with our way of working we cant merge code which break any other functionality. I know the issue about saving 6Mb, but as we agree in https://bugzilla.mozilla.org/show_bug.cgi?id=801351#c57 We dont want to loose features that are currently working!  I think that this bug is blocked by the 'Notification' issue, so I would like to listen how we could fix it with our Gecko Team ;).
Comment 76 [:fabrice] Fabrice Desré 2012-11-15 09:43:48 PST
(In reply to Etienne Segonzac (:etienne) from comment #66)
> Fabrice do you think bug 778668 can be resurected?

I see what you did here... but yes, let me try.
Comment 77 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-11-15 10:34:27 PST
(In reply to Fabrice Desré [:fabrice] from comment #76)
> (In reply to Etienne Segonzac (:etienne) from comment #66)
> > Fabrice do you think bug 778668 can be resurected?
> 
> I see what you did here... but yes, let me try.

If we can have this feature combined with bug 779895 it would be doable to create an hack to go to a specific panel.
Comment 78 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-11-15 10:37:52 PST
(In reply to Salvador de la Puente González [:salva] from comment #65)
> The problem is not the callback is collected by the GC, the problem is that
> the memory of the process has been completely wiped out. Doesn't it?
>

Yep.
 
> Now, returning to the discussion. Suppose we leave the background process,
> but with the registration of the system message handler instead of listening
> through the DOM API. Why this approach, which does not even open the
> application (so, it does not load any resource neither) can occupy 6MiB? It
> can not be the closure in background.js Is it the background iframe
> overhead? I hope no but I don't know.

This is a whole process, so this is expensive.
Comment 79 Alex Keybl [:akeybl] 2012-11-16 09:27:24 PST
(In reply to Vivien Nicolas (:vingtetun) from comment #74)
> This particular bug is about removing the background service and save us 6mb
> of RAM. It will also expose the notifications of the SMS app to the same
> issue that exists for other apps. This issue should be solved globally and
> blocking this bug won't resolve the issue for the other apps :)

OK thanks for the explanation - what bug is blocking this work currently? I see bug 805655 marked as a blocker, is that everything we need to do for SMS before removing the comms bg service?
Comment 80 Andreas Gal :gal 2012-11-18 02:37:10 PST
I noticed that cost control also eagerly starts a process during startup. Can we make that at least lazy, and ideally not start at all except when invoked?
Comment 81 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-11-18 13:18:10 PST
It's also permanently set as "foreground" so its memory will be unreclaimable in practice.  The iframe needs proper setVisible() calls like all the other app iframes.

Is there already a bug filed on that?
Comment 82 Salvador de la Puente González [:salva] 2012-11-19 00:01:37 PST
Hey [:cjones], [:gal],

First, check this:
https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/cost_control.js

Note the bindings:
  window.addEventListener('utilitytrayshow', _showWidget);
  window.addEventListener('utilitytrayhide', _hideWidget);

That set visibility.

Anyway, if you think there is still a problem, can we move comments #80 and #81 to another thread? I think this is not related with removing the SMS background but with another file such as "Mark CostControl widget iframe as foreground/background" and they can introduce noise.
Comment 83 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-11-19 12:06:59 PST
Filed bug 813262 for problems with foregrounding/backgrounding.
Comment 84 Borja Salguero [:borjasalguero] 2012-11-21 02:08:20 PST
As this code breaks notifications for incoming SMS and it's a 'have to/must' (check https://bugzilla.mozilla.org/show_bug.cgi?id=801351#c62), Im gonna r- until having a fix for this issue. As I agree with [:vingtetun] (https://bugzilla.mozilla.org/show_bug.cgi?id=801351#c57) we need the support of our platform folks for getting a solution for this issue, and we cant add features breaking others.
Comment 85 Etienne Segonzac (:etienne) 2012-11-21 02:43:30 PST
(In reply to Borja Salguero [:borjasalguero] from comment #84)
> As this code breaks notifications for incoming SMS and it's a 'have to/must'
> (check https://bugzilla.mozilla.org/show_bug.cgi?id=801351#c62), Im gonna r-
> until having a fix for this issue. As I agree with [:vingtetun]
> (https://bugzilla.mozilla.org/show_bug.cgi?id=801351#c57) we need the
> support of our platform folks for getting a solution for this issue, and we
> cant add features breaking others.

Actually the SMS notifications are already broken (see bug 813917) and the same bug for the missed call notification (bug 796493) was minused...

I really want to fix this notification issue, and Vivien may have a plan. But in the meantime if those issue are vital we should probably have blocking basecamp + bugs for them both, otherwise we should land this patch.
Comment 86 Borja Salguero [:borjasalguero] 2012-11-21 03:13:45 PST
[:etienne] As next week we are going to work together, what about to deal with this issue (and the others related) and create a small 'roadmap' in order to have more clear who and when is gonna fix these bugs? As you know the code for me it's ok, but I would like to have clear when we are going to have all features working! (now we have in SMS less features than one week and a half ago... and trust me that Im really worried about it).
Comment 87 Etienne Segonzac (:etienne) 2012-11-21 04:53:55 PST
(In reply to Borja Salguero [:borjasalguero] from comment #86)
> [:etienne] As next week we are going to work together, what about to deal
> with this issue (and the others related) and create a small 'roadmap' in
> order to have more clear who and when is gonna fix these bugs? As you know
> the code for me it's ok, but I would like to have clear when we are going to
> have all features working! (now we have in SMS less features than one week
> and a half ago... and trust me that Im really worried about it).

Sounds like a plan :)
Comment 88 Salvador de la Puente González [:salva] 2012-11-21 06:00:39 PST
Count with me, please! :)
Comment 89 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-11-27 08:56:04 PST
(In reply to Borja Salguero [:borjasalguero] from comment #84)
> As this code breaks notifications for incoming SMS and it's a 'have to/must'
> (check https://bugzilla.mozilla.org/show_bug.cgi?id=801351#c62), Im gonna r-
> until having a fix for this issue. As I agree with [:vingtetun]
> (https://bugzilla.mozilla.org/show_bug.cgi?id=801351#c57) we need the
> support of our platform folks for getting a solution for this issue, and we
> cant add features breaking others.

This will be fixed by the underlying platform work we are doing with Fabrice. this patch should not wait any longer since it already blocks 4 other blockers and landing it won't regress anything since the notification is already broken because of activity.
Comment 90 Etienne Segonzac (:etienne) 2012-11-27 09:07:12 PST
Created attachment 685658 [details]
Pointer to gaia pull request

Okay here it is!

What's new:
This PR contains the work needed to fix the notification support (currently not working).

It will be fully functional once the bug 778668 and 814074 land.

In the meantime it fixes memory issues for the SMS app and various notifications-related blockers.

Asking :vingtetun for review since the changes from the last PR are only system/notifications related.
Comment 91 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-11-27 09:18:33 PST
Comment on attachment 685658 [details]
Pointer to gaia pull request

Sounds good to me. Let's fix all those C2 issues that will be fixed by this patch and that broke smoke tests...

The notification issue (which does not depends on this bug) will be fixed by the underlying platform work - which will also fix the dialer/others notifications!
Comment 92 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-11-27 09:21:46 PST
https://github.com/mozilla-b2g/gaia/commit/a1ba7afbbaafd81aa2914383f7d3e76df4ceccad

Note You need to log in before you can comment on or make changes to this bug.