Closed Bug 1123580 Opened 9 years ago Closed 9 years ago

[Telephony] Reorganize mmi parsing related code

Categories

(Firefox OS Graveyard :: RIL, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.2 S4 (23jan)

People

(Reporter: aknow, Assigned: aknow)

Details

Attachments

(1 file, 1 obsolete file)

Just want to reorganize the code to make it clearer.
Attachment #8551664 - Flags: review?(htsai)
Comment on attachment 8551664 [details] [diff] [review]
Reorganize mmi parsing related code

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

Thank you!
Attachment #8551664 - Flags: review?(htsai) → review+
There is a flaw in previous version. gMMIParser refers to isEmergencyNumber() which is still under TelephonyService.

I am thinking about doing it more by extracting them into DialNumberUtils.jsm which provides abilities to check and parse the dial number.
Attachment #8552297 - Flags: review?(htsai)
Attachment #8551664 - Attachment is obsolete: true
Comment on attachment 8552297 [details] [diff] [review]
#2 Reorganize mmi parsing related code

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

Looks good. r=me with comment addressed, thank you.

::: dom/telephony/gonk/DialNumberUtils.jsm
@@ +7,5 @@
> +this.EXPORTED_SYMBOLS = ["DialNumberUtils"];
> +
> +const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
> +
> +Cu.import("resource://gre/modules/XPCOMUtils.jsm");

This should be safe to remove.

::: dom/telephony/gonk/TelephonyService.js
@@ +81,5 @@
>    Cu.import("resource://gre/modules/PhoneNumberUtils.jsm", ns);
>    return ns.PhoneNumberUtils;
>  });
>  
> +XPCOMUtils.defineLazyGetter(this, "gDialNumberUtils", function() {

With gDialNumberUtils, we don't need [1] anymore. Please help remove it.

[1] https://dxr.mozilla.org/mozilla-central/source/dom/telephony/gonk/TelephonyService.js?from=TelephonyService.js#13
Attachment #8552297 - Flags: review?(htsai) → review+
https://hg.mozilla.org/mozilla-central/rev/755c92298a53
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S4 (23jan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: