Closed
Bug 912902
Opened 11 years ago
Closed 11 years ago
B2G MMS/SMS: retrieve GSM MSISDN / CDMA MDN correctly
Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(blocking-b2g:koi+, firefox25 wontfix, firefox26 fixed, firefox27 fixed, b2g-v1.2 fixed)
People
(Reporter: vicamo, Assigned: edgar)
References
Details
Attachments
(1 file, 4 obsolete files)
(deleted),
patch
|
edgar
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #869778 +++
In MmsService[1] we have:
1234 getMsisdn: function getMsisdn() {
1235 let iccInfo = gRadioInterface.rilContext.iccInfo;
1236 let number = iccInfo ? iccInfo.msisdn : null;
Since |iccInfo| is now (bug 869778) a nsIDOMMozIccInfo, which has no |msisdn| property because it's moved into nsIDOMMozGsmIccInfo, this triggers a silent bug that we can't have MSISDN in components other than RadioInterface itself.
[1]: http://mxr.mozilla.org/mozilla-central/source/dom/mobilemessage/src/gonk/MmsService.js#1234
Reporter | ||
Comment 1•11 years ago
|
||
Attachment 793853 [details] [diff] (for bluetooth), attachment 793850 [details] [diff] [review] (for GPS) are also victims of this bug.
Reporter | ||
Comment 3•11 years ago
|
||
Please see bug 907585 comment 24. Will probably have the same problem in other chrome components.
There is a similar problem in displaying the phone number in the settings app under Device Information sub menu.
Comment 5•11 years ago
|
||
Edgar,
Please provide updates if the issue has been fixed or not.
Flags: needinfo?(echen)
Assignee | ||
Comment 6•11 years ago
|
||
Hi Preeti, I have a local branch working on this, will upload patch later, thanks.
Flags: needinfo?(echen)
Assignee | ||
Comment 7•11 years ago
|
||
In this patch, I replace 'msisdn' by 'phoneNumber' in MmsService, because 'msisdn' is too gsm specific term. And getPhoneNumber() will help to retrieve phone number from correct attribute.
Attachment #816980 -
Flags: feedback?(vyang)
Comment 8•11 years ago
|
||
If so, could you please also solve the one in the RadioInterfaceLayer.js? Although this bug was titled for MMS only, we need to solve the SMS part as well.
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Gene Lian [:gene] (Summit + PTOs 10/3 ~ 10/14) from comment #8)
> If so, could you please also solve the one in the RadioInterfaceLayer.js?
> Although this bug was titled for MMS only, we need to solve the SMS part as
> well.
Sure, I will solve the one in RadioInterfaceLayer.js as well.
Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → 1.2 C3(Oct25)
Assignee | ||
Comment 10•11 years ago
|
||
Attachment #816980 -
Attachment is obsolete: true
Attachment #816980 -
Flags: feedback?(vyang)
Assignee | ||
Updated•11 years ago
|
Component: DOM: Device Interfaces → RIL
Product: Core → Boot2Gecko
Summary: B2G MMS: retrieve GSM MSISDN / CDMA MDN correctly → B2G MMS/SMS: retrieve GSM MSISDN / CDMA MDN correctly
Assignee | ||
Comment 11•11 years ago
|
||
Comment on attachment 818311 [details] [diff] [review]
MMS/SMS: retrieve GSM MSISDN / CDMA MDN correctly, v2
Hi Vicamo, Gene, could you help to review this patch for me?
Changes:
1). Because iccInfo could be nsIDOMGsmIccInfo or nsIDOMCdmaIccInfo, we should create corresponding object when updating iccInfo in RadioInterface.
2). SMS:
- Rename getMsisdn() to getPhoneNumber() and get correct attribute based on the type of iccInfo.
3). MMS:
- Rename getMsisdn() to getPhoneNumber() and get correct attribute based on the type of iccInfo.
- Change the msisdn field to phoneNumber in MmsDatabase. Should we do other modification due to database change?
Attachment #818311 -
Flags: review?(vyang)
Attachment #818311 -
Flags: review?(gene.lian)
Comment 12•11 years ago
|
||
Comment on attachment 818311 [details] [diff] [review]
MMS/SMS: retrieve GSM MSISDN / CDMA MDN correctly, v2
Review of attachment 818311 [details] [diff] [review]:
-----------------------------------------------------------------
Overall, this is good but you didn't fix the logic within the saveReceivedMessage in MobileMessageDatabaseService.js (i.e. aMessage.msisdn), so giving review-.
::: dom/mobilemessage/src/gonk/MmsService.js
@@ +1245,2 @@
> let iccInfo = gRadioInterface.rilContext.iccInfo;
> + let number;
Please put number after the check of |if (!iccInfo)| which might do early return.
@@ +1252,5 @@
> + if (iccInfo instanceof Ci.nsIDOMMozGsmIccInfo) {
> + number = iccInfo.msisdn;
> + } else {
> + number = iccInfo.mdn;
> + }
let number = (iccInfo instanceof Ci.nsIDOMMozGsmIccInfo)
? iccInfo.msisdn : iccInfo.mdn;
::: dom/system/gonk/RadioInterfaceLayer.js
@@ +1103,2 @@
> let iccInfo = this.rilContext.iccInfo;
> + let number;
Ditto.
@@ +1106,5 @@
> + if (!iccInfo) {
> + return null;
> + }
> +
> + if (iccInfo instanceof GsmIccInfo) {
Ditto.
Attachment #818311 -
Flags: review?(gene.lian) → review-
Reporter | ||
Updated•11 years ago
|
Attachment #818311 -
Flags: review?(vyang)
Assignee | ||
Comment 13•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #12)
> Comment on attachment 818311 [details] [diff] [review]
> MMS/SMS: retrieve GSM MSISDN / CDMA MDN correctly, v2
>
> Review of attachment 818311 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Overall, this is good but you didn't fix the logic within the
> saveReceivedMessage in MobileMessageDatabaseService.js (i.e.
> aMessage.msisdn), so giving review-.
I see, I will address this in next version, thanks.
Assignee | ||
Comment 14•11 years ago
|
||
Address review comment #13
Attachment #818311 -
Attachment is obsolete: true
Assignee | ||
Comment 15•11 years ago
|
||
Correct some comments.
Attachment #818360 -
Attachment is obsolete: true
Attachment #818365 -
Flags: review?(gene.lian)
Comment 16•11 years ago
|
||
Comment on attachment 818365 [details] [diff] [review]
MMS/SMS: retrieve GSM MSISDN / CDMA MDN correctly, v4
Review of attachment 818365 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/system/gonk/RadioInterfaceLayer.js
@@ +1114,5 @@
> + if (!iccInfo) {
> + return null;
> + }
> +
> + let number = (iccInfo instanceof GsmIccInfo) ? iccInfo.msisdn : iccInfo.mdn;
You use Ci.nsIDOMMozGsmIccInfo above. I'm not sure which one is more correct but we had better to choose one.
The rest looks good to me. Thank you!
Attachment #818365 -
Flags: review?(gene.lian) → review+
Assignee | ||
Comment 17•11 years ago
|
||
(In reply to Gene Lian [:gene] (needinfo? encouraged) from comment #16)
> Comment on attachment 818365 [details] [diff] [review]
> MMS/SMS: retrieve GSM MSISDN / CDMA MDN correctly, v4
>
> Review of attachment 818365 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/system/gonk/RadioInterfaceLayer.js
> @@ +1114,5 @@
> > + if (!iccInfo) {
> > + return null;
> > + }
> > +
> > + let number = (iccInfo instanceof GsmIccInfo) ? iccInfo.msisdn : iccInfo.mdn;
>
> You use Ci.nsIDOMMozGsmIccInfo above. I'm not sure which one is more correct
> but we had better to choose one.
>
> The rest looks good to me. Thank you!
I have did some test, it seems we could not use Ci.nsIDOMMozGsmIccInfo here, so I use GsmIccInfo, I guess it is because we did not get iccInfo through XPCOM interface, but access object directly.
Assignee | ||
Comment 18•11 years ago
|
||
Assignee | ||
Comment 19•11 years ago
|
||
Add some comments about comment #17.
Attachment #818365 -
Attachment is obsolete: true
Attachment #818827 -
Flags: review+
Assignee | ||
Comment 20•11 years ago
|
||
Comment 21•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 22•11 years ago
|
||
status-b2g-v1.2:
--- → fixed
status-firefox25:
--- → wontfix
status-firefox26:
--- → fixed
status-firefox27:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•