Closed Bug 990368 Opened 11 years ago Closed 11 years ago

[B2G][MMS][DSDS] Feedback NonActiveSimError if send an MMS with non active SIM selected.

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set
blocker

Tracking

(blocking-b2g:1.4+, firefox29 wontfix, firefox30 fixed, firefox31 fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S5 (11apr)
blocking-b2g 1.4+
Tracking Status
firefox29 --- wontfix
firefox30 --- fixed
firefox31 --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: bevis, Assigned: bevis)

References

Details

Attachments

(4 files, 3 obsolete files)

This is to provide a short term solution in gecko side mentioned in [1] to 1. Saving sending message to MobileMessageDB. 2. Return NonActiveSimError if the specified serviceId is not active. [1]https://bugzilla.mozilla.org/show_bug.cgi?id=983315#c31
blocking-b2g: --- → 1.4?
Target Milestone: --- → 1.4 S5 (11apr)
(In reply to Bevis Tseng [:bevistseng] (btseng@mozilla.com) from comment #2) > Created attachment 8399882 [details] [diff] [review] > Patch Part2: Add corresponding test case to verify error cases in sending > MMS. r=vyang BTW, test case is passed in both ics/jb emulators.
Attachment #8399881 - Flags: review?(vyang) → review+
Comment on attachment 8399882 [details] [diff] [review] Patch Part2: Add corresponding test case to verify error cases in sending MMS. r=vyang Review of attachment 8399882 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/mobilemessage/tests/marionette/head.js @@ +142,5 @@ > + * @param aSendParameters a MmsSendParameters instance. > + * > + * @return A deferred promise. > + */ > +function sendMmsFailedWithErrorName(aMmsParameters, aSendParameters) { We have already 'sendMmsWithFailure'. We can do: function sendMmsWithFailure(aMmsParameters, aSendParameters) { let deferred = Promise.defer(); let result = { message: null, error: null }; function got(which, value) { result[which] = value; if (result.message !== null && result.error !== null) { deferred.resolve(result); } } manager.addEventListener("failed", function onfailed(event) { manager.removeEventListener("failed", onfailed); got("message", event.message); }); let request = manager.sendMMS(aMmsParameters, aSendParameters); request.onsuccess = function(event) { deferred.reject(); }; request.onerror = function(event) { got("error", event.target.error); }; return deferred.promise; } @@ +500,5 @@ > + * @param aTest > + * A function which will be invoked w/o parameter. > + * @return a Promise object. > + */ > +function startDSDSTest(aTest) { Since we're going to have DSDA and it's not a start function, that would be better named 'runIfMultiSIM'. ::: dom/mobilemessage/tests/marionette/test_error_of_mms_send.js @@ +7,5 @@ > +const kPrefRilRadioDisabled = "ril.radio.disabled"; > + > +function testSendFailed(aCause, aServiceId) { > + log("testSendFailed, aCause: " + aCause + ", aServiceId: " + aServiceId); > + var sendParameters; nit: let @@ +20,5 @@ > + > + return sendMmsFailedWithErrorName(mmsParameters, sendParameters) > + .then((result) => { > + is(result, aCause, "Checking failure cause."); > + }); nit: align to re't'urn
Attachment #8399882 - Flags: review?(vyang)
1.4+ for Moz RIL issue
blocking-b2g: 1.4? → 1.4+
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #4) > > +function sendMmsFailedWithErrorName(aMmsParameters, aSendParameters) { > > We have already 'sendMmsWithFailure'. We can do: Thanks for better suggestion of reusing sendMmsWithFailure. :) Will follow the suggestion. > > @@ +500,5 @@ > > + * @param aTest > > + * A function which will be invoked w/o parameter. > > + * @return a Promise object. > > + */ > > +function startDSDSTest(aTest) { > > Since we're going to have DSDA and it's not a start function, that would be > better named 'runIfMultiSIM'. > Will do. > ::: dom/mobilemessage/tests/marionette/test_error_of_mms_send.js > @@ +7,5 @@ > > +const kPrefRilRadioDisabled = "ril.radio.disabled"; > > + > > +function testSendFailed(aCause, aServiceId) { > > + log("testSendFailed, aCause: " + aCause + ", aServiceId: " + aServiceId); > > + var sendParameters; > > nit: let Will do. > > @@ +20,5 @@ > > + > > + return sendMmsFailedWithErrorName(mmsParameters, sendParameters) > > + .then((result) => { > > + is(result, aCause, "Checking failure cause."); > > + }); > > nit: align to re't'urn Will do.
address suggestions in comment 4.
Attachment #8399882 - Attachment is obsolete: true
Attachment #8400367 - Flags: review?(vyang)
1. Apply the refactoring of getRadioDisabledState() in master. 2. Feedback NonActiveSimError if send an MMS with non active SIM selected.
Attachment #8400428 - Flags: review?(vyang)
Comment on attachment 8400367 [details] [diff] [review] Patch Part2 v2: Add corresponding test case to verify error cases in sending MMS. r=vyang Review of attachment 8400367 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/mobilemessage/tests/marionette/head.js @@ +131,2 @@ > manager.onfailed = function(event) { > manager.onfailed = null; Please use 'addEventListener' as I did. It's for possible concurrent sendMmsWithFailure calls via |Promise.all()|.
Attachment #8400367 - Flags: review?(vyang)
Attachment #8400430 - Flags: review?(vyang)
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #10) > Please use 'addEventListener' as I did. It's for possible concurrent > sendMmsWithFailure calls via |Promise.all()|. Sorry for missing this part and thanks for the explanation. I'll change it again to meet this design.
address the problem in comment 10.
Attachment #8400367 - Attachment is obsolete: true
Attachment #8400471 - Flags: review?(vyang)
Attachment #8400471 - Flags: review?(vyang) → review+
Attachment #8400428 - Flags: review?(vyang) → review+
Attachment #8400472 - Flags: review?(vyang) → review+
Comment on attachment 8400428 [details] [diff] [review] Patch Part1 [1.4]: Feedback NonActiveSimError if send an MMS with non active SIM selected. r=vyang, a=1.4+ [Approval Request Comment] Bug caused by (feature/regressing bug #): 947139 User impact if declined: In bug 947139, Gaia introduce a new UX in composer to select the SIM for sending MMS on the fly. However, there is no mechanism to save this sending message into MobileMessageDB located in Gecko. That means there might be data lost while switching the SIM after message is composed and sent. Hence, we provide this error handling for DSDS to allow SMS app to store the sending MMS message with NonActiveSimError to allow Gaia to switching the SIM after the sending message was saved into DB. Testing completed (on m-c, etc.): on both m-c, m-aurora. Risk to taking this patch (and alternatives if risky): No. String or IDL/UUID changes made by this patch:No.
Attachment #8400428 - Flags: approval-mozilla-aurora?
Comment on attachment 8400472 [details] [diff] [review] Patch Part2 v2 [1.4]: Add corresponding test case to verify error cases in sending MMS. r=vyang, a=1.4+ [Approval Request Comment] Bug caused by (feature/regressing bug #): 947139 User impact if declined: In bug 947139, Gaia introduce a new UX in composer to select the SIM for sending MMS on the fly. However, there is no mechanism to save this sending message into MobileMessageDB located in Gecko. That means there might be data lost while switching the SIM after message is composed and sent. Hence, we provide this error handling for DSDS to allow SMS app to store the sending MMS message with NonActiveSimError to allow Gaia to switching the SIM after the sending message was saved into DB. Testing completed (on m-c, etc.): on both m-c, m-aurora. Risk to taking this patch (and alternatives if risky): No. String or IDL/UUID changes made by this patch:No.
Attachment #8400472 - Flags: approval-mozilla-aurora?
Comment on attachment 8400428 [details] [diff] [review] Patch Part1 [1.4]: Feedback NonActiveSimError if send an MMS with non active SIM selected. r=vyang, a=1.4+ At this point in the v1.4 cycle, blockers still have auto-approval for uplift. As always, you can check the B2G Landing page for up-to-date information :) https://wiki.mozilla.org/Release_Management/B2G_Landing
Attachment #8400428 - Flags: approval-mozilla-aurora?
Attachment #8400472 - Flags: approval-mozilla-aurora?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: