Closed
Bug 809213
Opened 12 years ago
Closed 12 years ago
Move PhoneNumber.js from Gaia to Gecko
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)
RESOLVED
FIXED
blocking-basecamp | + |
People
(Reporter: gwagner, Assigned: gwagner)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
We want to move PhoneNumber.js from gaia into a jsm in Gecko.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → anygregor
Assignee | ||
Comment 1•12 years ago
|
||
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
Assignee | ||
Updated•12 years ago
|
blocking-basecamp: --- → ?
Assignee | ||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #679401 -
Attachment is obsolete: true
Attachment #679829 -
Flags: review?(gal)
Comment 4•12 years ago
|
||
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+
Assignee | ||
Comment 5•12 years ago
|
||
Updated•12 years ago
|
blocking-basecamp: ? → +
Comment 6•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 7•12 years ago
|
||
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
Comment 8•12 years ago
|
||
In line 23 of test_phonenumber.xul
Components.utils.import("resource:///modules/PhoneNumber.jsm");
Shouldn't this be a GRE resource path?
Assignee | ||
Comment 9•12 years ago
|
||
(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!
Comment 10•12 years ago
|
||
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.
Description
•