Closed
Bug 912005
Opened 11 years ago
Closed 11 years ago
[Bluetooth][HFP][CDMA] (Gaia dialer) Inform gecko bluetooth of call manipulations for CLCC
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(blocking-b2g:1.3+, firefox28 fixed)
People
(Reporter: ben.tian, Assigned: rexboy)
References
Details
Attachments
(2 files, 1 obsolete file)
For HFP CLCC command under CDMA, Gecko BT has to be informed of following call manipulations:
- answer waiting call
- reject waiting call
- switch active <-> held calls
- (no support in v1.2 RIL) put an active call on hold and make a MO call
- (no support in v1.2 RIL) merge calls
Two ways to notify BT: DOM API from dialer or event from RIL. We prefer RIL event as it also works for future 3rd-party apps and doesn't require super review. Still two cons remain: 1) RIL doesn't know 'reject waiting call' (A+W -> A) as dialer only removes notification and does nothing to RIL. And 2) RIL code would become messy and all other components can register to know these call manipulations.
Need to choose one way otherwise BT fails PTS certification test.
Reporter | ||
Comment 1•11 years ago
|
||
Gabriele & Etienne,
This is Ben working on gecko bluetooth for CDMA. I'd like to add new webapi functions to make dialer notify gecko bluetooth of call manipulations (mentioned in comment 0). The reason to choose dialer instead of RIL is that only dialer knows 'reject waiting call' action in CDMA. Please let me know your opinion on the dialer change.
CLCC command requires gecko bluetooth notify BT headset of all current call states. In GSM gecko bluetooth is informed of call state changes directly from RIL; however in CDMA only 1 call object exists and gecko bluetooth can't know precise call states of the two numbers. So instead gecko bluetooth needs to know these call manipulations to determine the precise call states in CDMA.
Flags: needinfo?(gsvelto)
Flags: needinfo?(etienne)
Comment 2•11 years ago
|
||
It's more of a platform decision, making the API call from the dialer should be pretty straightforward whatever solution is chosen.
Flags: needinfo?(etienne)
Reporter | ||
Comment 3•11 years ago
|
||
Thanks Etienne.
The actions bluetooth needs to know from dialer are:
- answer a waiting call
- reject a waiting call
- switch active and held calls
I'll list the api in detail and discuss with you later this week.
Comment 4•11 years ago
|
||
(In reply to Ben Tian [:btian] from comment #3)
> The actions bluetooth needs to know from dialer are:
> - answer a waiting call
In CDMA call waiting mode this is done by invoking the TelephonyCall.hold() method, it might be possible to modify the RIL to send that information.
> - switch active and held calls
Same as above.
> - reject a waiting call
This is the nasty case, CDMA has no notion of rejecting an incoming call so there's nothing to reflect it and only the dialer knows this has happened so this does require some other method.
Flags: needinfo?(gsvelto)
Reporter | ||
Updated•11 years ago
|
Summary: [Bluetooth][HFP][CDMA] Inform gecko bluetooth of call manipulations for CLCC → [Bluetooth][HFP][CDMA] (Gaia dialer) Inform gecko bluetooth of call manipulations for CLCC
Reporter | ||
Comment 5•11 years ago
|
||
The WIP calls following 3 new functions to inform bluetooth adapter in CDMA:
1) OnAnswerWaitingCall - dialer answers the waiting call
2) OnIgnoreWaitingCall - dialer ignores the waiting call
3) OnToggleCalls - dialer toggles active and held calls
This gaia patch works with gecko patches in bug 925638.
[TODO] Revise code to get bluetooth adapter and handle errors.
Assignee: nobody → btian
Reporter | ||
Comment 6•11 years ago
|
||
The PR gets bluetooth adapter in dialer to notify call operations in CDMA. Note the related webidl change is under review in bug 925638.
Etienne, can you review my dialer change? Thanks.
Attachment #815746 -
Attachment is obsolete: true
Attachment #816536 -
Flags: review?(etienne)
Attachment #816536 -
Flags: feedback?(arthur.chen)
Comment 7•11 years ago
|
||
Comment on attachment 816536 [details]
link to https://github.com/mozilla-b2g/gaia/pull/12812
f=me for the helper part. The variable name `helper` is too generic. Maybe use `bluetoothHelper`?
Attachment #816536 -
Flags: feedback?(arthur.chen) → feedback+
Comment 8•11 years ago
|
||
Comment on attachment 816536 [details]
link to https://github.com/mozilla-b2g/gaia/pull/12812
Thanks for the clean patch!
Did 2 small (but important ;)) comments on github.
But mainly this needs unit tests.
I think we need:
* A mock_bluetooth_helper.js
* sinon spies [1] to make sure that the right calls are made in calls_handler_test.js
* a mock_navigator_moz_bluetooth.js
* coverage for the basic logic in a newly created bluetooth_helper_test.js
[1] http://sinonjs.org/docs/#spies
Attachment #816536 -
Flags: review?(etienne)
Assignee | ||
Comment 9•11 years ago
|
||
Nominating koi?,
since bug 917344(koi+) can be done on top of bluetooth_helper introduced in this patch.
blocking-b2g: --- → koi?
Reporter | ||
Comment 10•11 years ago
|
||
Remove koi? as Rex will integrate bluetooth_helper into bug 917344's fix directly.
blocking-b2g: koi? → ---
Reporter | ||
Comment 12•11 years ago
|
||
Change owner to Rex for gaia revision. He has integrated part of comment 6 patch in bug 917344.
Rex, let me know once you complete the patch and I'll test it again. Thanks for the help.
Assignee: btian → rexboy
Assignee | ||
Comment 13•11 years ago
|
||
Hello Ben:
The patch is done. Basically just rebase the original patch onto current
bluetooth_helper and add unit test.
Would you make a test to make sure if the functions are all OK?
Attachment #824509 -
Flags: feedback?(btian)
Reporter | ||
Comment 14•11 years ago
|
||
Comment on attachment 824509 [details]
Patch / with unit test
The patch works as expected. Thanks for the prompt help.
Attachment #824509 -
Flags: feedback?(btian) → feedback+
Assignee | ||
Comment 15•11 years ago
|
||
Comment on attachment 824509 [details]
Patch / with unit test
Thank you for verifying Ben!
Etienne may you help review this patch?
Attachment #824509 -
Flags: review?(etienne)
Comment 16•11 years ago
|
||
Comment on attachment 824509 [details]
Patch / with unit test
Perfect, thanks Rex, thanks Ben!
Attachment #824509 -
Flags: review?(etienne) → review+
Assignee | ||
Comment 17•11 years ago
|
||
Thanks for timely reviewing, Etienne!
And thanks Ben and Arthur for working on this patch. Merged:
master
https://github.com/mozilla-b2g/gaia/commit/c942ea58a74ca425fa9e974b2e340b19b8db3893
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
status-firefox28:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•