Closed Bug 809213 Opened 12 years ago Closed 12 years ago

Move PhoneNumber.js from Gaia to Gecko

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)

RESOLVED FIXED
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: gwagner, Assigned: gwagner)

References

Details

Attachments

(1 file, 1 obsolete file)

We want to move PhoneNumber.js from gaia into a jsm in Gecko.
Assignee: nobody → anygregor
It seems we have to expose this library to Gaia. The call log DB might need to access the library for example.
Summary: Mova PhoneNumber.js from Gaia to Gecko → Move PhoneNumber.js from Gaia to Gecko
blocking-basecamp: --- → ?
Attached patch WiP (obsolete) (deleted) — Splinter Review
Attached patch patch (deleted) — Splinter Review
Attachment #679401 - Attachment is obsolete: true
Attachment #679829 - Flags: review?(gal)
Comment on attachment 679829 [details] [diff] [review] patch Review of attachment 679829 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/phonenumberutils/PhoneNumber.jsm @@ +1,2 @@ > +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ > +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ Insert a comment here with a link to the github repo asking people to not make local changes. ::: dom/phonenumberutils/PhoneNumberUtils.jsm @@ +7,5 @@ > + > +const DEBUG = true; > +function debug(s) { dump("-*- PhoneNumberutils: " + s + "\n"); } > + > +const Cu = Components.utils; trailing whitespace @@ +17,5 @@ > + "@mozilla.org/ril/content-helper;1", > + "nsIRILContentHelper"); > + > +this.PhoneNumberUtils = { > + I don't think we want an empty line here @@ +25,5 @@ > + // 4. If we don't have, default to some mcc > + _getCountryName: function() { > + let mcc; > + let countryName; > + // Get network mcc. Fibonacci indentation? Can you review your tab settings? @@ +34,5 @@ > + if (!mcc) > + mcc = ril.iccInfo.mcc || '724'; > + > + countryName = MCC_ISO3166_TABLE[mcc]; > + debug("MCC: " + mcc + "countryName: " + countryName); is this always printed or only in debug builds? @@ +40,5 @@ > + }, > + > + parse: function(aNumber) { > + let result = PhoneNumber.Parse(aNumber, this._getCountryName()); > + debug("InternationalFormat: " + result.internationalFormat); dito @@ +51,5 @@ > + parseWithMCC: function(aNumber, aMCC) { > + let countryName = MCC_ISO3166_TABLE[aMCC]; > + debug("found country name: " + countryName); > + return PhoneNumber.Parse(aNumber, countryName); > + }, seriously ::: dom/phonenumberutils/mcc_iso3166_table.jsm @@ +15,5 @@ > +344:'AG', > +722:'AR', > +283:'AM', > +363:'AW', > +505:'AU', ... @@ +64,5 @@ > +638:'DJ', > +366:'DM', > +370:'DO', > +514:'TL', > +740:'EC', !!! @@ +230,5 @@ > +314:'US', > +315:'US', > +316:'US', > +332:'VI', > +748:'UY', ?!?!?!
Attachment #679829 - Flags: review?(gal) → review+
blocking-basecamp: ? → +
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
In line 23 of test_phonenumber.xul Components.utils.import("resource:///modules/PhoneNumber.jsm"); Shouldn't this be a GRE resource path?
(In reply to Jim Mathies [:jimm] from comment #8) > In line 23 of test_phonenumber.xul > > Components.utils.import("resource:///modules/PhoneNumber.jsm"); > > Shouldn't this be a GRE resource path? Yes. Thanks a lot!
Depends on: 810609
Waiting for Bug 810609 landing into b2g18. BTW, the phonenumberutils do not have marionette tests.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: