Closed Bug 859318 Opened 12 years ago Closed 12 years ago

[b2g-ril] Handle call waiting settings through mozMobilleConnection/mozIccManager API

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
1.0.1 Madrid (19apr)
blocking-b2g tef+
Tracking Status
firefox21 --- wontfix
firefox22 --- wontfix
firefox23 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: jaoo, Assigned: jaoo)

References

Details

(Whiteboard: [madrid][fixed-in-birch], IOT)

Attachments

(4 files, 4 obsolete files)

In order to implement a better UX for call waiting settings we need to implement RIL_REQUEST_QUERY_CALL_WAITING request. The approach followed in call forwarding settings seems to work fine so the idea is to add a couple of functions like `setCallWaitingOption()` and `getCallWaitingOption()` to mozMobilleConnection/mozIccManager API.
blocking-b2g: --- → tef?
Attached patch WIP v1 (obsolete) — Splinter Review
Jonas, this WIP code is about adding to mozMobileConnection API a couple of functions for handling call waiting settings. Could you take a look please? Thx!
Attachment #734639 - Flags: feedback?(jonas)
blocks a blocker
blocking-b2g: tef? → tef+
Attachment #734639 - Attachment is obsolete: true
Attachment #734639 - Flags: feedback?(jonas)
Attachment #735188 - Attachment is patch: true
Comment on attachment 735185 [details] [diff] [review] Part 1: IDL changes for call waiting functions. v1. Jonas, this WIP code is about adding to mozMobileConnection API a couple of functions for handling call waiting settings. Could you take a look please? Thx!
Attachment #735185 - Flags: feedback?(jonas)
It still need test. Working on it.
Jose, does the settings app query for call waiting every time user enters the "Call Settings" or only when the settings app is started? The reason I am asking is that call waiting can also be set through MMI codes and if the settings app doesn't requery everytime the call settings screen is open the call waiting setting might be out of syn if user changed the call waiting setting through MMI code.
(In reply to Anshul from comment #8) > Jose, does the settings app query for call waiting every time user enters > the "Call Settings" or only when the settings app is started? The reason I > am asking is that call waiting can also be set through MMI codes and if the > settings app doesn't requery everytime the call settings screen is open the > call waiting setting might be out of syn if user changed the call waiting > setting through MMI code. Anshul, that's a very good question. We run into this issue in the past with call forwarding settings so this time we will do it properly in the gaia side of this development (bug 857691). BTW, AFAIK Moz RIL implementation doesn't support handling call waiting settings through MMI codes, does it? (See [1] please). [1] http://mxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_worker.js#2313
Jose, I know Moz RIL doesn't support call waiting through MMI codes but if it did in future, there would be a problem.
Attachment #735185 - Attachment description: Part 1: IDL changes for call waiting functions. WIP v1. → Part 1: IDL changes for call waiting functions. v1.
Attachment #735185 - Flags: feedback?(jonas) → superreview?(jonas)
Comment on attachment 735187 [details] [diff] [review] Part 2: Changes in MobileConnection.cpp for call waiting functions. v1. This patch is about adding the boilerplate cpp code for adding a couple of function for setting call waiting options to mozMobileConnection API. Could you take a look please? Thanks.
Attachment #735187 - Attachment description: Part 2: Changes in MobileConnection.cpp for call waiting functions. WIP v1. → Part 2: Changes in MobileConnection.cpp for call waiting functions. v1.
Attachment #735187 - Flags: review?(bugs)
Comment on attachment 735188 [details] [diff] [review] Part 3: RIL changes for call waiting functions. v1. Vicamo, this patch is about adding and changing the code in the RIL for adding a couple of functions for setting call waiting options to mozMobileConnection. Existing approach through mozSetting API didn't implement the function for querying call waiting status and it cause some weird states even being the phone able to receive the call waiting settings from the network. This was raised by the certification team. Could you take a look please? Thx!
Attachment #735188 - Attachment description: Part 3: RIL changes for call waiting functions. WIP v1. → Part 3: RIL changes for call waiting functions. v1.
Attachment #735188 - Flags: review?(vyang)
Comment on attachment 735185 [details] [diff] [review] Part 1: IDL changes for call waiting functions. v1. Review of attachment 735185 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/network/interfaces/nsIDOMMobileConnection.idl @@ +303,5 @@ > + * Queries current call waiting options. > + * > + * If successful, the request's onsuccess will be called, and the request's > + * result will be an object containing information about the operation > + * e.g. {enabled: true}. Why does it have to be wrapped by an object?
Comment on attachment 735188 [details] [diff] [review] Part 3: RIL changes for call waiting functions. v1. Review of attachment 735188 [details] [diff] [review]: ----------------------------------------------------------------- This means those interested in call waiting setting will not be notified unless the request is made himself. Doesn't that cause UI inconsistency? ::: dom/system/gonk/RILContentHelper.js @@ +112,5 @@ > + this.enabled = options.enabled; > +}; > +CallWaitingOption.prototype = { > + __exposedProps__ : {enabled: 'r'} > +}; Can't we just fireSuccess(boolean)? @@ +753,5 @@ > + let request = Services.DOMRequest.createRequest(window); > + let requestId = this.getRequestId(request); > + > + cpmm.sendAsyncMessage("RIL:GetCallWaitingOption", { > + requestId: requestId nit: trailing ws ::: dom/system/gonk/ril_worker.js @@ +4748,5 @@ > + return; > + } > + options.length = Buf.readUint32(); > + options.enabled = ((Buf.readUint32() == 1) && > + ((Buf.readUint32() & ICC_SERVICE_CLASS_VOICE) == 0x01)); nit: trailing ws
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #14) > Comment on attachment 735185 [details] [diff] [review] > Part 1: IDL changes for call waiting functions. v1. > > Review of attachment 735185 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/network/interfaces/nsIDOMMobileConnection.idl > @@ +303,5 @@ > > + * Queries current call waiting options. > > + * > > + * If successful, the request's onsuccess will be called, and the request's > > + * result will be an object containing information about the operation > > + * e.g. {enabled: true}. > > Why does it have to be wrapped by an object? Because I was wondering if it'd be useful to return the service class bit vector of services for which call waiting is enabled and add it another property for that. Thoughts?
(In reply to Vicamo Yang [:vicamo][:vyang] from comment #15) > Comment on attachment 735188 [details] [diff] [review] > Part 3: RIL changes for call waiting functions. v1. > > Review of attachment 735188 [details] [diff] [review]: > ----------------------------------------------------------------- > > This means those interested in call waiting setting will not be notified > unless the request is made himself. Doesn't that cause UI inconsistency? Why? AFAIK call waiting settings are set under user action and there is no any kind of unsolicited message coming from the network letting know the device that call waiting settings have changed so IMHO there is no need of notifications here. If you look into the code of bug 857691 the user sets the call waiting preferences but right after setting them we query those settings before showing the real status reported from the network. That way the UI always maintains consistency with the real status. That's what we did for call forwarding settings and how Android works too.
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #17) > (In reply to Vicamo Yang [:vicamo][:vyang] from comment #15) > > Comment on attachment 735188 [details] [diff] [review] > > Part 3: RIL changes for call waiting functions. v1. > > > > Review of attachment 735188 [details] [diff] [review]: > > ----------------------------------------------------------------- > > > > This means those interested in call waiting setting will not be notified > > unless the request is made himself. Doesn't that cause UI inconsistency? > > Why? AFAIK call waiting settings are set under user action and there is no > any kind of unsolicited message coming from the network letting know the > device that call waiting settings have changed so IMHO there is no need of > notifications here. Not exactly. The current call waiting settings notification isn't based on some event but on settings change. The current implementation is that, settings value is not just the user settings but the real call waiting status as well. Once the settings value change (means the call waiting status changes as well), every application listening will get the notification. That makes the all the applications interested in call waiting status consistant. > If you look into the code of bug 857691 the user sets > the call waiting preferences but right after setting them we query those > settings before showing the real status reported from the network. That way > the UI always maintains consistency with the real status. That's what we did > for call forwarding settings and how Android works too.
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #18) > Not exactly. The current call waiting settings notification isn't based on > some event but on settings change. The current implementation is that, > settings value is not just the user settings but the real call waiting > status as well. Well, I know current implementation notifies other applications by listening for/observing changes in the 'ril.callwaiting.enabled' setting and its value reflects which the real status is always. > Once the settings value change (means the call waiting > status changes as well), every application listening will get the > notification. That makes the all the applications interested in call waiting > status consistant. IIRC there are no other applications observing changes for the 'ril.callwaiting.enabled' settings, aren't there? If so we could keep setting the call waiting status requested from the network in the 'ril.callwaiting.enabled' settings every time the `getCallWaitingOption()` function get called from the call setting UI. Thoughts?
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #19) > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #18) > > Not exactly. The current call waiting settings notification isn't based on > > some event but on settings change. The current implementation is that, > > settings value is not just the user settings but the real call waiting > > status as well. > > Well, I know current implementation notifies other applications by listening > for/observing changes in the 'ril.callwaiting.enabled' setting and its value > reflects which the real status is always. > > > Once the settings value change (means the call waiting > > status changes as well), every application listening will get the > > notification. That makes the all the applications interested in call waiting > > status consistant. > > IIRC there are no other applications observing changes for the > 'ril.callwaiting.enabled' settings, aren't there? If so we could keep > setting the call waiting status requested from the network in the > 'ril.callwaiting.enabled' settings every time the `getCallWaitingOption()` > function get called from the call setting UI. Thoughts? I do support that we have a separate API for set/get call waiting because the current implementation is sort of misusing the real concept of 'setttings.' We should keep settings value simply what it should be, instead of letting the value indicating both the user's expectation and real state. It's indeed appropriate to correct the misbeaviour in this issue. So I am afraid that I incline to not supporting changing 'ril.callwaiting.enabled.' As I know, Gaia team/Settings App owners have discussed the misusing of settings API, and planned to corret that.
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #20) > I do support that we have a separate API for set/get call waiting because > the current implementation is sort of misusing the real concept of > 'setttings.' We should keep settings value simply what it should be, instead > of letting the value indicating both the user's expectation and real state. > It's indeed appropriate to correct the misbeaviour in this issue. So I am > afraid that I incline to not supporting changing 'ril.callwaiting.enabled.' I'm sorry but I'm getting myself lost in the discussion. Are you saying that we should keep current implementation and keep handling call waiting settings through mozSettings API? If so IMHO I don't agree because in current implementation there is no way to be sure about which the real status is. It just simply sets the desired value and reflects that status in the UI but doesn't query/check if that desired stated was set by the network successfully because the function needed for requesting real status is not implemented in current implementation. This work was started as a need for bug 857691 found for the certification process. Take a look at it please. > As I know, Gaia team/Settings App owners have discussed the misusing of > settings API, and planned to corret that.
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #21) > (In reply to Hsin-Yi Tsai [:hsinyi] from comment #20) > > I do support that we have a separate API for set/get call waiting because > > the current implementation is sort of misusing the real concept of > > 'setttings.' We should keep settings value simply what it should be, instead > > of letting the value indicating both the user's expectation and real state. > > It's indeed appropriate to correct the misbeaviour in this issue. So I am > > afraid that I incline to not supporting changing 'ril.callwaiting.enabled.' > > I'm sorry but I'm getting myself lost in the discussion. Are you saying that > we should keep current implementation and keep handling call waiting > settings through mozSettings API? If so IMHO I don't agree because in > current implementation there is no way to be sure about which the real > status is. It just simply sets the desired value and reflects that status in > the UI but doesn't query/check if that desired stated was set by the network > successfully because the function needed for requesting real status is not > implemented in current implementation. > > This work was started as a need for bug 857691 found for the certification > process. Take a look at it please. > No, I wasn't saying that we should keep the current implementation. As I said, I do support that we have a separate API for set/get call waiting as what you're trying to do in this bug, because the current implementation is sort of misusing the real concept of 'setttings.' I just said that, Not update ril.callwaiting.enabled even when getCallWaitingOption() got called. We should keep the value of ril.callwaiting.enabled simply as what user requests instead what the exact call waiting state. Hope it's clear now. > > As I know, Gaia team/Settings App owners have discussed the misusing of > > settings API, and planned to corret that.
Attachment #735187 - Flags: review?(bugs) → review+
If mozSetings is used to keep user preference, it should only be changed at the time of users set the setting value explicitly. On the other hand, if mozSettins is used for UI (i.e. icons on the status bar), we should update the corresponding setting value in mozSettings after an API got called. All of this really depend on how we use mozSettings. Now we use it in both two ways. In this case, if we are going to make it consistent with the implementation of call forwarding, I would suggest update ril.callwaiting.enabled when getCallWaitingOption() got called. > I just said that, Not update ril.callwaiting.enabled even when > getCallWaitingOption() got called. We should keep the value of > ril.callwaiting.enabled simply as what user requests instead what the exact > call waiting state. Hope it's clear now. > > > As I know, Gaia team/Settings App owners have discussed the misusing of > > > settings API, and planned to corret that.
(In reply to Arthur Chen [:arthurcc] from comment #23) > If mozSetings is used to keep user preference, it should only be changed at > the time of users set the setting value explicitly. On the other hand, if > mozSettins is used for UI (i.e. icons on the status bar), we should update > the corresponding setting value in mozSettings after an API got called. All > of this really depend on how we use mozSettings. Now we use it in both two > ways. > Yes, I know that mozSettings are used in both 2 ways, but I also heard that Gaia/Settings owners have a plan to correct the inconsistant behaviours, so that mozSettings express user preference only. That'w why I think it's better to not update ril.callwating.enabled in this issue. If you think having the same behaviour with call forwarding, then I'll be fine that we file another bug to correct the mozSetting's inconsistancy. > In this case, if we are going to make it consistent with the implementation > of call forwarding, I would suggest update ril.callwaiting.enabled when > getCallWaitingOption() got called. > > > I just said that, Not update ril.callwaiting.enabled even when > > getCallWaitingOption() got called. We should keep the value of > > ril.callwaiting.enabled simply as what user requests instead what the exact > > call waiting state. Hope it's clear now. > > > > As I know, Gaia team/Settings App owners have discussed the misusing of > > > > settings API, and planned to corret that.
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #24) > (In reply to Arthur Chen [:arthurcc] from comment #23) > > If mozSetings is used to keep user preference, it should only be changed at > > the time of users set the setting value explicitly. On the other hand, if > > mozSettins is used for UI (i.e. icons on the status bar), we should update > > the corresponding setting value in mozSettings after an API got called. All > > of this really depend on how we use mozSettings. Now we use it in both two > > ways. > > > > Yes, I know that mozSettings are used in both 2 ways, but I also heard that > Gaia/Settings owners have a plan to correct the inconsistant behaviours, so > that mozSettings express user preference only. That'w why I think it's > better to not update ril.callwating.enabled in this issue. If you think > having the same behaviour with call forwarding, then I'll be fine that we Oops, missing some keywords, though you might be able to infer my complete thoughts from the conext. "If you think having the same behaviour with call forwarding is better, then I'll be fine .... " > file another bug to correct the mozSetting's inconsistancy. > > > > In this case, if we are going to make it consistent with the implementation > > of call forwarding, I would suggest update ril.callwaiting.enabled when > > getCallWaitingOption() got called.
Hsin-Yi, Arthur, we could avoid updating `ril.callwating.enabled` in the RIL plumbing and let the Setting App doing it to make it consistent with the implementation of call forwarding. That way the Setting could update it in bug 857691 and remove it depending on how the mozSetting API changes in the future.
Jose, Hsin-Yi, I just found that what my suggestion in comment 23 is not very clear. What I really meant was updating ril.callwaiting.enabled from *gaia* after getCallWaitingOption() got called.
(In reply to Arthur Chen [:arthurcc] from comment #27) > Jose, Hsin-Yi, I just found that what my suggestion in comment 23 is not > very clear. What I really meant was updating ril.callwaiting.enabled from > *gaia* after getCallWaitingOption() got called. Cool, that sounds good to me as well as jaoo's comment 26.
Whiteboard: NO_UPLIFT → NO_UPLIFT [status: needs review jonas, vicamo]
Whiteboard: NO_UPLIFT [status: needs review jonas, vicamo] → IOT, NO_UPLIFT [status: needs review jonas, vicamo]
Whiteboard: IOT, NO_UPLIFT [status: needs review jonas, vicamo] → IOT, NO_UPLIFT [status: needs review jonas, vicamo][madrid]
Whiteboard: IOT, NO_UPLIFT [status: needs review jonas, vicamo][madrid] → NO_UPLIFT [status: needs review jonas, vicamo]
Comment on attachment 735185 [details] [diff] [review] Part 1: IDL changes for call waiting functions. v1. Review of attachment 735185 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/network/interfaces/nsIDOMMobileConnection.idl @@ +303,5 @@ > + * Queries current call waiting options. > + * > + * If successful, the request's onsuccess will be called, and the request's > + * result will be an object containing information about the operation > + * e.g. {enabled: true}. I agree with Vicamo, this shouldn't need to be wrapped in an object.
Attachment #735185 - Flags: superreview?(jonas) → superreview+
Whiteboard: NO_UPLIFT [status: needs review jonas, vicamo] → NO_UPLIFT [status: needs review jonas, vicamo][madrid]
Vicamo, these are the tests. I've already checked that they pass. Could you take a look please?
Attachment #735844 - Attachment is obsolete: true
Attachment #738551 - Flags: review?(vyang)
Comment on attachment 735188 [details] [diff] [review] Part 3: RIL changes for call waiting functions. v1. Review of attachment 735188 [details] [diff] [review]: ----------------------------------------------------------------- Please fire request results with a boolean value instead.
Attachment #735188 - Flags: review?(vyang)
Comment on attachment 738551 [details] [diff] [review] Part 4: Add test for call waiting functions. v2. Review of attachment 738551 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/tests/test_ril_worker_cw.js @@ +37,5 @@ > + }; > + > + worker.RIL.setCallWaiting({ > + enabled: true > + }); Boolean along is sufficient. Is there any reason we must wrap a simple boolean value with an object?
Attachment #738551 - Flags: review?(vyang)
Sicking's comments addressed.
Attachment #735185 - Attachment is obsolete: true
Vicamo's comments addressed. Vicamo, could you take a look please? Thanks!
Attachment #735188 - Attachment is obsolete: true
Attachment #738950 - Flags: review?(vyang)
(In reply to Vicamo Yang (@Telefonica 6F) [:vicamo][:vyang] from comment #33) > Comment on attachment 738551 [details] [diff] [review] > Part 4: Add test for call waiting functions. v2. > > Review of attachment 738551 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/system/gonk/tests/test_ril_worker_cw.js > @@ +37,5 @@ > > + }; > > + > > + worker.RIL.setCallWaiting({ > > + enabled: true > > + }); > > Boolean along is sufficient. Is there any reason we must wrap a simple > boolean value with an object? The setCallWaiting() function in ril_worker receives an object as parameter.
Comment on attachment 738950 [details] [diff] [review] Part 3: RIL changes for call waiting functions. v2. Review of attachment 738950 [details] [diff] [review]: ----------------------------------------------------------------- Thank you ;)
Attachment #738950 - Flags: review?(vyang) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: NO_UPLIFT [status: needs review jonas, vicamo][madrid] → NO_UPLIFT [madrid][fixed-in-birch]
Ooops! I resolved the bug by accident. Sorry for that. Reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: NO_UPLIFT [madrid][fixed-in-birch] → NO_UPLIFT [madrid][fixed-in-birch], IOT
Target Milestone: --- → Madrid (19apr)
Dietrich, if this bug is a NO_UPIFT because of us would like you to know that this can be uplifted as the corresponding change in commercial RIL is ready.
Flags: needinfo?(dietrich)
(In reply to Anshul from comment #41) > Dietrich, if this bug is a NO_UPIFT because of us would like you to know > that this can be uplifted as the corresponding change in commercial RIL is > ready. Anshul, we need you to review if this bug could be uplifted to mozilla-b2g18 and mozilla-b2g18_v1_0_1 release repos. This bug is blocking other upliftings. Take a look please. Thanks.
Flags: needinfo?(anshulj)
Antonio, yes we already have the corresponding change in commercial RIL. We are testing the change by manually pulling in the dependencies. In fact getting this landed will help us test it quickly.
Flags: needinfo?(anshulj)
Whiteboard: NO_UPLIFT [madrid][fixed-in-birch], IOT → [madrid][fixed-in-birch], IOT
Flags: needinfo?(dietrich)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: