Closed
Bug 1193609
Opened 10 years ago
Closed 10 years ago
[IMS] WebIDL: IMS Registration Manager
Categories
(Firefox OS Graveyard :: RIL, defect, P1)
Tracking
(feature-b2g:2.2r+, b2g-v2.2r fixed, b2g-master wontfix)
People
(Reporter: bevis, Assigned: bevis)
Details
(Keywords: dev-doc-needed)
Attachments
(5 files, 7 obsolete files)
8.51 KB,
patch
|
bevis
:
review+
|
Details | Diff | Splinter Review |
6.76 KB,
patch
|
bevis
:
review+
|
Details | Diff | Splinter Review |
34.43 KB,
patch
|
bevis
:
review+
|
Details | Diff | Splinter Review |
29.29 KB,
patch
|
bevis
:
review+
|
Details | Diff | Splinter Review |
13.94 KB,
patch
|
bevis
:
review+
|
Details | Diff | Splinter Review |
*** Duplication of bug 1185437 ***
This bug is to support the management of IMS registration including:
1. Enable/Disable IMS.
2. Report of IMS registration status and reject cause.
3. Set the preferred IMS bearer (Wifi-preferred, Wifi-only, cellular-preferred, cellular-only)
Note: In this bug, we provides the WebIDL interface of this feature.
The underlying implementation can be added from oem vendor by providing the implementation of the xpcom service interface defined in this bug.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8646817 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Attachment #8646817 -
Attachment description: (v3) 1193609 - Part 1: Add IDL interface and The Callback Implementation under DOM API. r=echen. → (v3) - Part 1: Add IDL interface and The Callback Implementation under DOM API. r=echen.
Assignee | ||
Comment 2•10 years ago
|
||
1. Rename Enabler as Finder.
2. Revise API doc.
Attachment #8646818 -
Flags: review?(echen)
Assignee | ||
Updated•10 years ago
|
Attachment #8646817 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8646818 -
Attachment is obsolete: true
Attachment #8646818 -
Flags: review?(echen)
Assignee | ||
Comment 3•10 years ago
|
||
review granted in bug 1185437.
Attachment #8646831 -
Flags: review+
Assignee | ||
Comment 4•10 years ago
|
||
1. Rename Enabler as Finder.
2. Revise API doc.
Attachment #8646834 -
Flags: review?(echen)
Assignee | ||
Comment 5•10 years ago
|
||
1. Rename Enabler as Finder.
2. Get numRils from MobileConnectionService.
3. Remove helper class of ImsRegServiceFinderChild.
Attachment #8646837 -
Flags: review?(echen)
Assignee | ||
Comment 6•10 years ago
|
||
Changes from v2 to v3:
1. Unregister listener from nsIImsRegHandler when unlinked during cycle collection.
2. Wrap the update of IMS capability as a helper function.
3. Make sure exception is thrown if not able to create promise of each setter API.
Hi Edgar, Hsinyi,
May I have your review for this change again?
Thanks!
Attachment #8646846 -
Flags: review?(htsai)
Attachment #8646846 -
Flags: review?(echen)
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8646846 [details] [diff] [review]
(v3) Part 4: Add WebIDL of ImsRegHandler into MobileConnection.
Hi Kyle,
In this bug, we would like to add new ImsRegHandler.webidl for Settings App to control the IMS registration status in RIL and this handler is hooked in each MobileConnection instance.
DOM peer's approval is required for the modification in file: dom/tests/mochitest/general/test_interfaces.html
May I have your review for this change?
Thanks!
Attachment #8646846 -
Flags: review?(khuey)
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8646847 -
Flags: review?(echen)
Updated•10 years ago
|
Keywords: dev-doc-needed
Comment 9•10 years ago
|
||
Comment on attachment 8646846 [details] [diff] [review]
(v3) Part 4: Add WebIDL of ImsRegHandler into MobileConnection.
Review of attachment 8646846 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM. Thank you.
Attachment #8646846 -
Flags: review?(echen) → review+
Updated•10 years ago
|
Attachment #8646834 -
Flags: review?(echen) → review+
Attachment #8646846 -
Flags: review?(htsai) → review+
Comment on attachment 8646846 [details] [diff] [review]
(v3) Part 4: Add WebIDL of ImsRegHandler into MobileConnection.
Managed to screw that up ...
Attachment #8646846 -
Flags: review?(khuey) → review?(htsai)
Comment 11•10 years ago
|
||
Comment on attachment 8646837 [details] [diff] [review]
(v3) Part 3: Add IPDL Implementation.
Review of attachment 8646837 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me, thank you.
::: dom/ipc/ContentChild.h
@@ +218,5 @@
> + virtual PImsRegServiceFinderChild*
> + AllocPImsRegServiceFinderChild() MOZ_OVERRIDE;
> + virtual bool
> + DeallocPImsRegServiceFinderChild(PImsRegServiceFinderChild*) MOZ_OVERRIDE;
> + PImsRegistrationChild*
Nit: One empty line here.
::: dom/ipc/ContentParent.h
@@ +528,5 @@
> virtual PMobileConnectionParent* AllocPMobileConnectionParent(const uint32_t& aClientId) MOZ_OVERRIDE;
> virtual bool DeallocPMobileConnectionParent(PMobileConnectionParent* aActor) MOZ_OVERRIDE;
>
> + virtual PImsRegServiceFinderParent* AllocPImsRegServiceFinderParent() MOZ_OVERRIDE;
> + virtual bool DeallocPImsRegServiceFinderParent(PImsRegServiceFinderParent* aActor) MOZ_OVERRIDE;
Nit: One empty line here.
::: dom/mobileconnection/ipc/ImsRegIPCService.cpp
@@ +1,2 @@
> +/* This Source Code Form is subject to the terms of the Mozilla Public
> +* License, v. 2.0. If a copy of the MPL was not distributed with this file,
Nit: Indentation.
::: dom/mobileconnection/ipc/ImsRegIPCService.h
@@ +1,2 @@
> +/* This Source Code Form is subject to the terms of the Mozilla Public
> +* License, v. 2.0. If a copy of the MPL was not distributed with this file,
Nit: Indentation.
Attachment #8646837 -
Flags: review?(echen) → review+
Comment 12•10 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #10)
> Comment on attachment 8646846 [details] [diff] [review]
> (v3) Part 4: Add WebIDL of ImsRegHandler into MobileConnection.
>
> Managed to screw that up ...
You succeeded! It indeed took me some minutes to figure out what you were trying to say in this comment ;)
Comment 13•10 years ago
|
||
Comment on attachment 8646847 [details] [diff] [review]
(v3) Part 5: Add Test Coverage using Mochitest.
Review of attachment 8646847 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with comment addressed. Thank you.
::: dom/mobileconnection/tests/mochitest/head_ims.js
@@ +28,5 @@
> + "allow": 1, "context": document }],
> + function() {
> + info("permission of mobileconnection is pushed");
> + imsRegHandler = navigator.mozMobileConnections[0].imsHandler;
> + ok(!!imsRegHandler, "imsRegHandler is granted.");
ok(imsRegHandler, ...) seems enough. Or is there any reason you use `!!`?
@@ +96,5 @@
> + SimpleTest.waitForExplicitFinish();
> + return ensureMockImsRegService()
> + .then(ensureImsRegHandler)
> + .then(aTestCaseMain)
> + .then(cleanUp, function(e) {
.catch(function(e) {
ok(false, 'promise rejects during test: ' + e);
})
.then(cleanUp);
::: dom/mobileconnection/tests/mochitest/mock_ims_reg_service.js
@@ +53,5 @@
> + /**
> + * nsIImsRegService interface.
> + */
> + getHandlerByServiceId: function(aServiceId) {
> + return aServiceId == 0 ? this._handlers[0] : null;
return this._handlers[aServiceId] || null;
@@ +107,5 @@
> + /**
> + * nsIImsRegHandler interface.
> + */
> + capability: Ci.nsIImsRegHandler.IMS_CAPABILITY_UNKNOWN,
> + unregisteredReason: null,
Seems we don't need this given that we already have |_capability|, |_unregisteredReason| and the getter functions.
::: dom/mobileconnection/tests/mochitest/test_ims_reg_handler.html
@@ +30,5 @@
> + is(imsRegHandler.unregisteredReason, aExpectedReason, "Check reason.");
> + }
> +
> + return Promise.resolve()
> + .then(() => updateImsCapability("voice-over-cellular", null))
Update capability in |verifyCapability()|.
e.g.
function verifyCapability(aExpectedCapability, aExpectedReason) {
return updateImsCapability(aExpectedCapability, aExpectedReason).then(() => {
// check ...
});
}
@@ +57,5 @@
> +
> +function verifyProfileChange() {
> + return Promise.resolve()
> + .then(() => setPreferredProfile("cellular-only"))
> + .then(() => is(getPreferredProfile(), "cellular-only",
Have an utility function for setting profile and then checking.
Attachment #8646847 -
Flags: review?(echen) → review+
Comment 14•10 years ago
|
||
Comment on attachment 8646846 [details] [diff] [review]
(v3) Part 4: Add WebIDL of ImsRegHandler into MobileConnection.
Review of attachment 8646846 [details] [diff] [review]:
-----------------------------------------------------------------
r=me for the webidl
Hi Bevis, if you need me to review other parts than .webidl files, feel free to let me know! Thank you.
::: dom/mobileconnection/MobileConnectionArray.cpp
@@ +121,5 @@
> + if (XRE_GetProcessType() == GeckoProcessType_Content) {
> + // Could be nullptr if the IMS feature is not enabled by the device.
> + service = mozilla::dom::mobileconnection::ImsRegIPCService::GetSingleton();
> + }
> + // Note: Gonk Implementation is provided by OEM Vendor by replacing the
nit: s/Implementation/implementation
Attachment #8646846 -
Flags: review?(htsai) → review+
Comment 15•10 years ago
|
||
It's Red-tai feature, so feature-blocking: 2.2r+.
We will land this on v2.2r only, so set status-b2g-master:wontfix.
Assignee | ||
Comment 16•10 years ago
|
||
update final patch for v2.2r
Attachment #8646831 -
Attachment is obsolete: true
Attachment #8649664 -
Flags: review+
Assignee | ||
Comment 17•10 years ago
|
||
update final patch for v2.2r.
Attachment #8646834 -
Attachment is obsolete: true
Attachment #8649665 -
Flags: review+
Assignee | ||
Comment 18•10 years ago
|
||
update final patch for v2.2r.
Attachment #8646837 -
Attachment is obsolete: true
Attachment #8649666 -
Flags: review+
Assignee | ||
Comment 19•10 years ago
|
||
update final patch for v2.2r.
Attachment #8646846 -
Attachment is obsolete: true
Attachment #8649668 -
Flags: review+
Assignee | ||
Comment 20•10 years ago
|
||
update final patch for v2.2r.
Attachment #8646847 -
Attachment is obsolete: true
Attachment #8649669 -
Flags: review+
Assignee | ||
Comment 21•10 years ago
|
||
Try server is green:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=52666e7ee718
Keywords: checkin-needed
Comment 22•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/36f8baf2076e
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/6f3518382af6
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/35cfe60016c5
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/215415f78d81
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/5cb7f7c8c783
Status: NEW → RESOLVED
Closed: 10 years ago
status-b2g-v2.2r:
--- → fixed
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S5 (21Aug)
Comment 23•10 years ago
|
||
Please explain the scenarios of Enable/Disable IMS. Does the Enable/Disable means IMS Registration/De-Registration respectively if so example scenarios for the same.
Assignee | ||
Comment 24•10 years ago
|
||
(In reply to parvathytest491 from comment #23)
> Please explain the scenarios of Enable/Disable IMS. Does the Enable/Disable
> means IMS Registration/De-Registration respectively if so example scenarios
> for the same.
Correctly, it's about asking the device for the IMS registration if SetEnabled(true).
Once the SetEnabled() promise is resolved,
1. the ImsRegHandler::enabled will be set to true.
2. Then, if the IMS registered or failed to registered eventually, the |ImsRegHandler::oncapabilitychange| will be triggered and |ImsRegHandler::capability| & |ImsRegHandler::unregisteredReason| will be updated accordingly.
The same flow will be applied when SetEnabled(false) with ImsRegHandler::enabled be set to false when promise is resolved.
For SetPreferredProfile(), this is to ask the IMS protocol stack to register the IMS over preferred bearer.
Note: Similar to the |radioEnabled| in MobileConnection, the persistent preference has to be stored by the app. The |ImsRegHandler::enabled| and |ImsRegHandler::preferredProfile| are used to track current state in IMS protocol only.
You need to log in
before you can comment on or make changes to this bug.
Description
•