[Telephony] Reorganize mmi parsing related code

RESOLVED FIXED in 2.2 S4 (23jan)

Status

Firefox OS
RIL
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: aknow, Assigned: aknow)

Tracking

unspecified
2.2 S4 (23jan)
x86_64
Linux
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
Just want to reorganize the code to make it clearer.
(Assignee)

Comment 1

4 years ago
Created attachment 8551664 [details] [diff] [review]
Reorganize mmi parsing related code
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+
(Assignee)

Comment 3

4 years ago
Created attachment 8552297 [details] [diff] [review]
#2 Reorganize mmi parsing related code

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)
(Assignee)

Updated

3 years ago
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
Last Resolved: 3 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.