Closed Bug 874769 Opened 11 years ago Closed 11 years ago

[Gaia] Use new WebAPI to access card state related attribute/event.

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: edgar, Assigned: edgar)

References

Details

Attachments

(1 file, 1 obsolete file)

246 bytes, text/html
salva
: review+
arcturus
: review+
arcturus
: review+
arthurcc
: review+
alive
: review+
etienne
: review+
Details
In bug 874744, we plan to move card state related attribute/event from mozMobileConnection to mozIccManager. This bug is filed in Gaia side to make corresponding changes. Thanks.
Component: Gaia::Settings → Gaia
Summary: [Gaia][Settings] Use new WebAPI to access card state related attribute/event. → [Gaia] Use new WebAPI to access card state related attribute/event.
Assignee: nobody → echen
Attached file gaia pull request #10451 (obsolete) —
Comment on attachment 764002 [details]
gaia pull request #10451

bug 874744 is already r+ and sr+. I would like to request review for this pull request first. Because cardState is used by many apps, so I split the patch into 6 parts, each part is for the changes of a specific app. I plan to merge the patches of Gaia and Gecko together after all got r+. Thanks
Attachment #764002 - Flags: review?(salva)
Attachment #764002 - Flags: review?(francisco.jordano)
Attachment #764002 - Flags: review?(fernando.campo)
Attachment #764002 - Flags: review?(etienne)
Attachment #764002 - Flags: review?(arthur.chen)
Comment on attachment 764002 [details]
gaia pull request #10451

r+ to the contacts part,

Thanks Edgar for taking care of this!
Attachment #764002 - Flags: review?(francisco.jordano) → review+
Comment on attachment 764002 [details]
gaia pull request #10451

FTU looks good too, thanks!
Attachment #764002 - Flags: review?(fernando.campo) → review+
I'm to wait until the BE patch lands as it is a key part on Cost Control and I want to try if something is broken.
Comment on attachment 764002 [details]
gaia pull request #10451

r=me on the dialer part.

Thank you for taking the time to craft this nice, green, pull request :)
Attachment #764002 - Flags: review?(etienne) → review+
(In reply to Salvador de la Puente González [:salva] from comment #6)
> I'm to wait until the BE patch lands as it is a key part on Cost Control and
> I want to try if something is broken.

Got it, please let me know when BE patch is landed, I will rebase for it. Thanks. :)
Comment on attachment 764002 [details]
gaia pull request #10451

Nice work! Thanks for taking care of this. r=me.
Attachment #764002 - Flags: review?(arthur.chen) → review+
Attachment #764002 - Flags: review?(alive)
Comment on attachment 764002 [details]
gaia pull request #10451

r+.
Is there any followup plan to move remaining iccinfo/iccinfochange to IccManager? This seems be on the halfway of the final target.
Attachment #764002 - Flags: review?(alive) → review+
(In reply to Alive Kuo [:alive] from comment #10)
> Comment on attachment 764002 [details]
> gaia pull request #10451
> 
> r+.
> Is there any followup plan to move remaining iccinfo/iccinfochange to
> IccManager? This seems be on the halfway of the final target.

Yes, please see bug 875721 and bug 877978. Thanks
(In reply to Edgar Chen [:edgar][:echen] from comment #8)
> (In reply to Salvador de la Puente González [:salva] from comment #6)
> > I'm to wait until the BE patch lands as it is a key part on Cost Control and
> > I want to try if something is broken.
> 
> Got it, please let me know when BE patch is landed, I will rebase for it.
> Thanks. :)

The back-end part is yours as well (bug 874744), if you provide me an image to test with it, then I could review this part.

(In reply to Salvador de la Puente González [:salva] from comment #12)
> (In reply to Edgar Chen [:edgar][:echen] from comment #8)
> > (In reply to Salvador de la Puente González [:salva] from comment #6)
> > > I'm to wait until the BE patch lands as it is a key part on Cost Control and
> > > I want to try if something is broken.
> > 
> > Got it, please let me know when BE patch is landed, I will rebase for it.
> > Thanks. :)
> 
> The back-end part is yours as well (bug 874744), if you provide me an image
> to test with it, then I could review this part.

Ok, I can provide the test image.
BTW, in bug 884274, :julienw mention that many of gaia developers use gaia master + gecko b2g18 to work. The back-end changes will be only happened in gecko m-c. Maybe we should consider to make this changes can support both gecko m-c and gecko b2g18. Any thoughts?
Depends on: 884274
Bug 884274 has created a helper for backward compatibility between gecko m-c and b2g18 for Icc API changes. We can use this for card state as well. I am going to provide a new version using this helper, will update later.
Attachment #764002 - Flags: review?(salva)
gaia pull request #10735 (Using IccHelper)
Attachment #764002 - Attachment is obsolete: true
Comment on attachment 770055 [details]
gaia pull request #10735

Salvador
Attachment #770055 - Flags: review?(salva)
Comment on attachment 770055 [details]
gaia pull request #10735

The new patches use IccHelper to access card state related events and attributes for the backward compatibility of gaia master on b2g18.
Salvador, Francisco, Fernando, Etienne, Arthur, Alive, please help to review the changes, thanks.
Attachment #770055 - Flags: review?(francisco.jordano)
Attachment #770055 - Flags: review?(fernando.campo)
Attachment #770055 - Flags: review?(etienne)
Attachment #770055 - Flags: review?(arthur.chen)
Attachment #770055 - Flags: review?(alive)
Comment on attachment 770055 [details]
gaia pull request #10735

Commented on github. We should lazy load the IccHelper in the dialer part.
Attachment #770055 - Flags: review?(etienne)
Comment on attachment 770055 [details]
gaia pull request #10735

It seems to completely work. Fine for me.
Attachment #770055 - Flags: review?(salva) → review+
Comment on attachment 770055 [details]
gaia pull request #10735

r+ to the contacts part once addressed the comment on github.

Thanks a lot Edgar!
Attachment #770055 - Flags: review?(francisco.jordano) → review+
Comment on attachment 770055 [details]
gaia pull request #10735

Happy API wrapper.
Attachment #770055 - Flags: review?(alive) → review+
Comment on attachment 770055 [details]
gaia pull request #10735

Update new patch for dialer (User lazy loader), request review again. Thanks.
Attachment #770055 - Flags: review?(etienne)
Comment on attachment 770055 [details]
gaia pull request #10735

Thank you for the effort, Edgar! r=me.
Attachment #770055 - Flags: review?(arthur.chen) → review+
Comment on attachment 770055 [details]
gaia pull request #10735

Thanks! All good for the dialer part.
Attachment #770055 - Flags: review?(etienne) → review+
Hi :arcturus, due to :fcampo is on PTO, could you help to review FTU part for me as well? Thanks in advance!
Attachment #770055 - Flags: review?(fernando.campo) → review?(francisco.jordano)
Hi Edgar,

no problem I'll review the FTU part :)

Thanks!
Comment on attachment 770055 [details]
gaia pull request #10735

FTU part checked on the phone.

Working perfectly, thanks a lot Edgar!
Attachment #770055 - Flags: review?(francisco.jordano) → review+
Thanks for the reviewing, everyone!
master: https://github.com/mozilla-b2g/gaia/commit/2f49c776a10357a5fe0ed2796439a6ce23d7e101
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
(In reply to Arthur Chen [:arthurcc] from comment #30)
> master:
> https://github.com/mozilla-b2g/gaia/commit/
> 2f49c776a10357a5fe0ed2796439a6ce23d7e101

I assume this patch has caused a 100ms startup regression on both contacts and dialer early july. The regression has been hidden because the we switched a little bit after from b2g-18 to m-c which is a bigger regression.

I bet that the main reason for this is because mozMobileConnection is expensive and should any calls related to it should be delayed when it is needed while the current icc_helper.js code makes a call to mozMobileConnection during app startup.

Ben, Kevin can you guys checks my assertion and make the appropriate fixes to icc_helper.js to avoid calling mozMobileConnection is it is not needed.
Flags: needinfo?(kgrandon)
Flags: needinfo?(bkelly)
Also one of Francisco comment has not been addressed if i understood correcty. The script is useless in the contacts app if you don't go to settings so he asked to lazy load it instead of always loading it.
Depends on: 913540
It feels like this would generally be fixed if we delay the calling of things that need icc_helper. I've opened bug 913540 to track this work. We'll work on prioritizing this bug and submitting patches where needed. Thanks!
Flags: needinfo?(kgrandon)
Flags: needinfo?(bkelly)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: