Closed Bug 1093014 Opened 10 years ago Closed 10 years ago

[B2G][RIL] handle in-call MMI codes correctly

Categories

(Firefox OS Graveyard :: RIL, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.2 S2 (19dec)

People

(Reporter: hsinyi, Assigned: aknow)

References

Details

Attachments

(3 files, 7 obsolete files)

Now gecko just sends the in-call MMI code dirrectly to carrier that is wrong. We should instead parse the code then ask for corresponding supplementary requests, AT+CHLD.

See  TS 22.030 Clause 6.5.5 http://www.etsi.org/deliver/etsi_ts/122000_122099/122030/10.00.00_60/ts_122030v100000p.pdf
Blocks: 890912
Hey Aknow,
Would you mind taking this bug? Thank you.
Flags: needinfo?(szchen)
Are we going to implement all the codes described in the spec or just part of them for the user story of bug 890912 ?

During a call:
1 SEND: retrieve a call previously put on hold
2 SEND: put on hold an active call
3 SEND: put the active call and the held one on a multiconference (merge)
Flags: needinfo?(szchen) → needinfo?(htsai)
Assignee: nobody → szchen
Attached patch Part 1: Refactoring (obsolete) — Splinter Review
Attachment #8522121 - Flags: review?(htsai)
Attached patch Part 2: Test in call MMI (obsolete) — Splinter Review
Attachment #8522122 - Flags: review?(htsai)
Attached patch Part 3: Implement in call MMI (obsolete) — Splinter Review
Attachment #8522123 - Flags: review?(htsai)
Support in call MMI: 1, 2, 3
Let me know if we really need to support 1X, 2X
(In reply to Szu-Yu Chen [:aknow] from comment #6)
> Support in call MMI: 1, 2, 3
> Let me know if we really need to support 1X, 2X

Yes, we need them :( And code 0, but I noticed you already considered that.

B.t.w., thank you for the quick patches!
Flags: needinfo?(htsai)
Attached patch Part 2#2: Test in call MMI (obsolete) — Splinter Review
Attachment #8522122 - Attachment is obsolete: true
Attachment #8522122 - Flags: review?(htsai)
Attachment #8522159 - Flags: review?(htsai)
Attached patch Part 3#2: Implement in call MMI (obsolete) — Splinter Review
Attachment #8522123 - Attachment is obsolete: true
Attachment #8522123 - Flags: review?(htsai)
Attachment #8522160 - Flags: review?(htsai)
Depends on: 1098193
Blocks: 1100200
No longer blocks: 1100200
Comment on attachment 8522121 [details] [diff] [review]
Part 1: Refactoring

Review of attachment 8522121 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/gonk/ril_worker.js
@@ +1905,5 @@
> +      return;
> +    }
> +
> +    if (this.currentConferenceState === CALL_STATE_ACTIVE) {
> +      this.hangUpForeground(options);

This reminds me that we forgot to set 'hangupLocal' for conference participants. Please file a follow-up bug for the fix, thank you.
Attachment #8522121 - Flags: review?(htsai) → review+
Comment on attachment 8522159 [details] [diff] [review]
Part 2#2: Test in call MMI

Review of attachment 8522159 [details] [diff] [review]:
-----------------------------------------------------------------

A main concern is about the potential timing issue, please see comments inline, thank you!

::: dom/telephony/test/marionette/test_incall_mmi_call_hold.js
@@ +32,5 @@
> +    .then(calls => [call1, call2] = calls)
> +    // Hangup held call.
> +    .then(() => gSendMMI("0"))
> +    .then(() => gWaitForNamedStateEvent(call1, "disconnected"))
> +    .then(() => gCheckAll(call2, [call2], "", [], [call2Info.active]))

Is there any chance that call1.disconnected is received but call2 state isn't ready? I may be too cautious about this type of timing problems...

@@ +33,5 @@
> +    // Hangup held call.
> +    .then(() => gSendMMI("0"))
> +    .then(() => gWaitForNamedStateEvent(call1, "disconnected"))
> +    .then(() => gCheckAll(call2, [call2], "", [], [call2Info.active]))
> +    .then(() => gRemoteHangUpCalls([call2]));

nit: gRemoteHangUp is also working

@@ +44,5 @@
> +    .then(calls => [call1, call2] = calls)
> +    // Hangup current call, resume held call.
> +    .then(() => gSendMMI("1"))
> +    .then(() => gWaitForNamedStateEvent(call1, "connected"))
> +    .then(() => gCheckAll(call1, [call1], "", [], [call1Info.active]))

ditto: timing b/w call1.connected and call2.disconnected

@@ +45,5 @@
> +    // Hangup current call, resume held call.
> +    .then(() => gSendMMI("1"))
> +    .then(() => gWaitForNamedStateEvent(call1, "connected"))
> +    .then(() => gCheckAll(call1, [call1], "", [], [call1Info.active]))
> +    .then(() => gRemoteHangUpCalls([call1]));

ditto

@@ +55,5 @@
> +  return setupTwoCalls()
> +    .then(calls => [call1, call2] = calls)
> +    // Hold current call, resume held call.
> +    .then(() => gSendMMI("2"))
> +    .then(() => gWaitForNamedStateEvent(call1, "connected"))

ditto: timing

@@ +60,5 @@
> +    .then(() => gCheckAll(call1, [call1, call2], "", [],
> +                          [call1Info.active, call2Info.held]))
> +    // Hold current call, resume held call.
> +    .then(() => gSendMMI("2"))
> +    .then(() => gWaitForNamedStateEvent(call2, "connected"))

ditto: timing

::: dom/telephony/test/marionette/test_incall_mmi_call_waiting.js
@@ +28,5 @@
> +    .then(calls => [outCall, inCall] = calls)
> +    // Hangup waiting call.
> +    .then(() => gSendMMI("0"))
> +    .then(() => gWaitForNamedStateEvent(inCall, "disconnected"))
> +    .then(() => gCheckAll(outCall, [outCall], "", [], [outInfo.active]))

ditto: timing

@@ +40,5 @@
> +    .then(calls => [outCall, inCall] = calls)
> +    // Hangup current call, accept waiting call.
> +    .then(() => gSendMMI("1"))
> +    .then(() => gWaitForNamedStateEvent(inCall, "connected"))
> +    .then(() => gCheckAll(inCall, [inCall], "", [], [inInfo.active]))

ditto: timing

@@ +53,5 @@
> +    // Hold current call, accept waiting call.
> +    .then(() => gSendMMI("2"))
> +    .then(() => gWaitForNamedStateEvent(inCall, "connected"))
> +    .then(() => gCheckAll(inCall, [outCall, inCall], "", [],
> +                          [outInfo.held, inInfo.active]))

ditto: timing
Attachment #8522159 - Flags: review?(htsai)
Comment on attachment 8522160 [details] [diff] [review]
Part 3#2: Implement in call MMI

Review of attachment 8522160 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me, thank you.
Attachment #8522160 - Flags: review?(htsai) → review+
> A main concern is about the potential timing issue, please see comments
> inline, thank you!
> 
> ::: dom/telephony/test/marionette/test_incall_mmi_call_hold.js
> @@ +32,5 @@
> > +    .then(calls => [call1, call2] = calls)
> > +    // Hangup held call.
> > +    .then(() => gSendMMI("0"))
> > +    .then(() => gWaitForNamedStateEvent(call1, "disconnected"))
> > +    .then(() => gCheckAll(call2, [call2], "", [], [call2Info.active]))
> 
> Is there any chance that call1.disconnected is received but call2 state
> isn't ready? I may be too cautious about this type of timing problems...

This one is okay. There won't be any state change for call2 (remained active).
 
> @@ +33,5 @@
> > +    // Hangup held call.
> > +    .then(() => gSendMMI("0"))
> > +    .then(() => gWaitForNamedStateEvent(call1, "disconnected"))
> > +    .then(() => gCheckAll(call2, [call2], "", [], [call2Info.active]))
> > +    .then(() => gRemoteHangUpCalls([call2]));
> 
> nit: gRemoteHangUp is also working

I'd like to use gRemoteHangUpCalls. Using this, it provides some kinds of consistency among all sub tests.

> @@ +44,5 @@
> > +    .then(calls => [call1, call2] = calls)
> > +    // Hangup current call, resume held call.
> > +    .then(() => gSendMMI("1"))
> > +    .then(() => gWaitForNamedStateEvent(call1, "connected"))
> > +    .then(() => gCheckAll(call1, [call1], "", [], [call1Info.active]))
> 
> ditto: timing b/w call1.connected and call2.disconnected

Currently, no problem for this one. Our implementation (processCall) guarantees all disconnected events are fired before statechanges. However, make it safer is better.

> 
> @@ +45,5 @@
> > +    // Hangup current call, resume held call.
> > +    .then(() => gSendMMI("1"))
> > +    .then(() => gWaitForNamedStateEvent(call1, "connected"))
> > +    .then(() => gCheckAll(call1, [call1], "", [], [call1Info.active]))
> > +    .then(() => gRemoteHangUpCalls([call1]));
> 
> ditto
> 
> @@ +55,5 @@
> > +  return setupTwoCalls()
> > +    .then(calls => [call1, call2] = calls)
> > +    // Hold current call, resume held call.
> > +    .then(() => gSendMMI("2"))
> > +    .then(() => gWaitForNamedStateEvent(call1, "connected"))
> 
> ditto: timing

Agree with you. Need to fix.

> 
> @@ +60,5 @@
> > +    .then(() => gCheckAll(call1, [call1, call2], "", [],
> > +                          [call1Info.active, call2Info.held]))
> > +    // Hold current call, resume held call.
> > +    .then(() => gSendMMI("2"))
> > +    .then(() => gWaitForNamedStateEvent(call2, "connected"))
> 
> ditto: timing

Agree with you. Need to fix.

> ::: dom/telephony/test/marionette/test_incall_mmi_call_waiting.js
> @@ +28,5 @@
> > +    .then(calls => [outCall, inCall] = calls)
> > +    // Hangup waiting call.
> > +    .then(() => gSendMMI("0"))
> > +    .then(() => gWaitForNamedStateEvent(inCall, "disconnected"))
> > +    .then(() => gCheckAll(outCall, [outCall], "", [], [outInfo.active]))
> 
> ditto: timing

no problem

> 
> @@ +40,5 @@
> > +    .then(calls => [outCall, inCall] = calls)
> > +    // Hangup current call, accept waiting call.
> > +    .then(() => gSendMMI("1"))
> > +    .then(() => gWaitForNamedStateEvent(inCall, "connected"))
> > +    .then(() => gCheckAll(inCall, [inCall], "", [], [inInfo.active]))
> 
> ditto: timing

Agree with you. Need to fix.

> @@ +53,5 @@
> > +    // Hold current call, accept waiting call.
> > +    .then(() => gSendMMI("2"))
> > +    .then(() => gWaitForNamedStateEvent(inCall, "connected"))
> > +    .then(() => gCheckAll(inCall, [outCall, inCall], "", [],
> > +                          [outInfo.held, inInfo.active]))
> 
> ditto: timing

Agree with you. Need to fix.
Attached patch Part 2#3: Test in call MMI (obsolete) — Splinter Review
Attachment #8522159 - Attachment is obsolete: true
Attachment #8526561 - Flags: review?(htsai)
Comment on attachment 8526561 [details] [diff] [review]
Part 2#3: Test in call MMI

Review of attachment 8526561 [details] [diff] [review]:
-----------------------------------------------------------------

Looks really good, thank you.
Attachment #8526561 - Flags: review?(htsai) → review+
Depends on: 1104590
Depends on: 1105988
Attachment #8522121 - Attachment is obsolete: true
Attachment #8534179 - Flags: review+
Attachment #8522160 - Attachment is obsolete: true
Attachment #8534180 - Flags: review+
Attachment #8526561 - Attachment is obsolete: true
Attachment #8534181 - Flags: review+
No longer depends on: 1104590
(In reply to Szu-Yu Chen [:aknow] from comment #19)
> try looks good
> https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=c4e31a6fa0f1

yeah but sorry had to back this out for the X1 Test failures https://treeherder.mozilla.org/logviewer.html#?job_id=969075&repo=b2g-inbound that became permanent
Flags: needinfo?(szchen)
Attachment #8534181 - Attachment is obsolete: true
Flags: needinfo?(szchen)
Attachment #8534860 - Flags: review+
(In reply to Carsten Book [:Tomcat] from comment #21)
> (In reply to Szu-Yu Chen [:aknow] from comment #19)
> > try looks good
> > https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=c4e31a6fa0f1
> 
> yeah but sorry had to back this out for the X1 Test failures
> https://treeherder.mozilla.org/logviewer.html#?job_id=969075&repo=b2g-
> inbound that became permanent

Sorry. It's my fault.

The problem is fixed
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=d1ae4be2c8a4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: