Closed Bug 1193609 Opened 10 years ago Closed 10 years ago

[IMS] WebIDL: IMS Registration Manager

Categories

(Firefox OS Graveyard :: RIL, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(feature-b2g:2.2r+, b2g-v2.2r fixed, b2g-master wontfix)

RESOLVED FIXED
FxOS-S5 (21Aug)
feature-b2g 2.2r+
Tracking Status
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.
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.
1. Rename Enabler as Finder. 2. Revise API doc.
Attachment #8646818 - Flags: review?(echen)
Attachment #8646817 - Attachment is obsolete: true
Attachment #8646818 - Attachment is obsolete: true
Attachment #8646818 - Flags: review?(echen)
1. Rename Enabler as Finder. 2. Revise API doc.
Attachment #8646834 - Flags: review?(echen)
1. Rename Enabler as Finder. 2. Get numRils from MobileConnectionService. 3. Remove helper class of ImsRegServiceFinderChild.
Attachment #8646837 - Flags: review?(echen)
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)
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)
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+
Attachment #8646834 - Flags: review?(echen) → 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 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+
(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 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 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+
It's Red-tai feature, so feature-blocking: 2.2r+. We will land this on v2.2r only, so set status-b2g-master:wontfix.
blocking-b2g: 2.2r? → ---
feature-b2g: --- → 2.2r+
update final patch for v2.2r.
Attachment #8646834 - Attachment is obsolete: true
Attachment #8649665 - Flags: review+
update final patch for v2.2r.
Attachment #8646837 - Attachment is obsolete: true
Attachment #8649666 - Flags: review+
update final patch for v2.2r.
Attachment #8646846 - Attachment is obsolete: true
Attachment #8649668 - Flags: review+
update final patch for v2.2r.
Attachment #8646847 - Attachment is obsolete: true
Attachment #8649669 - Flags: review+
No longer depends on: 1217285
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.
(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.

Attachment

General

Created:
Updated:
Size: