Closed
Bug 827212
Opened 12 years ago
Closed 12 years ago
[Bluetooth][Hfp] Support feature: Enhanced call status indications
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: gyeh, Assigned: gyeh)
References
Details
Attachments
(6 files, 7 obsolete files)
4.47 KB,
patch
|
Details | Diff | Splinter Review | |
16.71 KB,
patch
|
Details | Diff | Splinter Review | |
4.11 KB,
patch
|
lsblakk
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
19.79 KB,
patch
|
akeybl
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
16.24 KB,
patch
|
Details | Diff | Splinter Review | |
3.37 KB,
patch
|
Details | Diff | Splinter Review |
To support "Enhanced call status indications", we need to be able to handle AT command: AT+CLCC, which shall be used to query list of current calls in AG.
Please see 4.31.1 "Query List of Current Calls in AG" of HFP 1.5 for more detail.
Assignee | ||
Comment 1•12 years ago
|
||
Create a new class "Call" consist of call information. These call information are maintained in mCurrentCallArray and will be returned whenever receiving AT+CLCC command
Attachment #698562 -
Flags: review?(echou)
Assignee | ||
Comment 2•12 years ago
|
||
Some functions in BluetoothHfpManager should be private functions, such as SendLine(), SetupCIND(), etc.
Attachment #698569 -
Flags: review?(echou)
Comment 3•12 years ago
|
||
Comment on attachment 698569 [details] [diff] [review]
Patch 2(v1): Move functions from public to private in BluetoothHfpManager
Review of attachment 698569 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits addressed
::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +209,5 @@
> return NS_OK;
> }
> };
>
> +NS_IMPL_ISUPPORTS1(BluetoothHfpManager::GetVolumeTask, nsISettingsServiceCallback);
Nit: 80 characters per line
@@ +256,5 @@
> return;
> }
>
> + const char* kHfpCrlf = "\xd\xa";
> + nsAutoCString RingMsg(kHfpCrlf);
Nit: The first letter of local variables should be uncapitalized, here and below.
Attachment #698569 -
Flags: review?(echou) → review+
Assignee | ||
Updated•12 years ago
|
Blocks: b2g-bluetooth-hfp
Assignee | ||
Comment 4•12 years ago
|
||
Final patch of Patch 2.
Attachment #698569 -
Attachment is obsolete: true
Comment 5•12 years ago
|
||
Comment on attachment 698562 [details] [diff] [review]
Patch 1(v1): Support feature 'Enhanced call status indications'
Review of attachment 698562 [details] [diff] [review]:
-----------------------------------------------------------------
ok, still some places to be modified, happy to review once you're ready.
::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +117,5 @@
> +
> + int state;
> + bool direction; // true: incoming call; false: outgoing call
> + nsString number;
> + int type;
Nit: please make these member variables initialized with "m"
@@ +315,5 @@
> sCINDItems[CINDType::CALLSETUP].value = CallSetupState::NO_CALLSETUP;
> sCINDItems[CINDType::CALLHELD].value = CallHeldState::NO_CALLHELD;
>
> + Call call;
> + mCurrentCallArray.AppendElement(call);
Please explain shortly about why we have to append one Call object at here. (index starts with 1)
@@ +957,5 @@
> + case nsIRadioInterfaceLayer::CALL_STATE_INCOMING:
> + if (i == mCurrentCallIndex)
> + message.AppendInt(4);
> + else
> + message.AppendInt(5);
Not-even-a-bug:
I would write this in one line, like:
message.AppendInt((i == mCurrentCallIndex) ? 4 : 5);
It's only my suggestion, though. You make the decision. :)
@@ +1094,5 @@
>
> // Find the first non-disconnected call (like connected, held),
> // and update mCurrentCallIndex
> + int c = 1;
> + for (int length = (int)mCurrentCallArray.Length(); c < length; c++) {
Not-even-a-nit: I don't write a for-loop this way very often. In this case, I may declare another variable 'length' outside to avoid calling Length() several times. It may be like:
int c = 1;
int length = mCurrentCallArray.Length();
for (; c < length; c++) {
...
}
if (c == length) {
...
}
or
while (c < length) {
...
c++;
}
if (c == length) {
...
}
::: dom/bluetooth/BluetoothHfpManager.h
@@ +23,5 @@
> + * of these constants is the same as TOA_INTERNATIONAL/TOA_UNKNOWN defined in
> + * ril_consts.js
> + */
> +#define TOA_UNKNOWN 0x81
> +#define TOA_INTERNATIONAL 0x91
I prefer not moving this part to header since those are only used in BluetoothHfpManager.cpp. Make sense?
Attachment #698562 -
Flags: review?(echou)
Assignee | ||
Comment 6•12 years ago
|
||
New patch with nit addressed:
- Make data members in class Call starting with 'm'
- Leave const definition of TOA_UNKNOWN/TOA_INTERNATIONAL in BluetoothHfpManager.cpp
- Replace a for loop with a while loop for the case of DISCONNECTED in SetupCIND()
- Add comment for the first call object in call array
- Add function ResetCallArray(), which is called whenever there's no call
- Change the type of argument aNumber of SetupCIND() from const char* to nsAString&
- Merge function SendCLCC into function SendCommand
Attachment #698562 -
Attachment is obsolete: true
Attachment #701678 -
Flags: review?(echou)
Assignee | ||
Comment 7•12 years ago
|
||
Attachment #700952 -
Attachment is obsolete: true
Assignee | ||
Comment 8•12 years ago
|
||
Attachment #701678 -
Attachment is obsolete: true
Attachment #701678 -
Flags: review?(echou)
Attachment #702203 -
Flags: review?(echou)
Comment 9•12 years ago
|
||
Comment on attachment 702203 [details] [diff] [review]
Patch 1(v2): Support feature 'Enhanced call status indications'
Review of attachment 702203 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good!
Attachment #702203 -
Flags: review?(echou) → review+
Assignee | ||
Comment 10•12 years ago
|
||
try:
https://tbpl.mozilla.org/?tree=Try&rev=ab6734df5ecf
https://tbpl.mozilla.org/?tree=Try&rev=7f05ebd3ec60
Attachment #702203 -
Attachment is obsolete: true
Assignee | ||
Comment 11•12 years ago
|
||
Comment 12•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/30e1cf104d2c
https://hg.mozilla.org/mozilla-central/rev/5bf4b30c71f5
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Updated•12 years ago
|
tracking-b2g18:
--- → ?
Assignee | ||
Comment 14•12 years ago
|
||
The patches here create an array of call object and the array is used in Bug 846647. Since bug 846647 is tracking-b2g18+, can we mark this tracking-b2g18+, too?
Comment 15•12 years ago
|
||
Yes, marking tracking since it's blocking other tracking work.
status-b2g18:
--- → affected
Comment 16•12 years ago
|
||
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): no
User impact if declined: no
Testing completed: mozilla-central
Risk to taking this patch (and alternatives if risky): Very low. Just re-organized the public/private method in class BluetoothHfpManager.
String or UUID changes made by this patch: no
Attachment #728903 -
Flags: approval-mozilla-b2g18?
Comment 17•12 years ago
|
||
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): no
User impact if declined: would miss a Bluetooth HFP feature which is neccesary for certification
Testing completed: mozilla-central
Risk to taking this patch (and alternatives if risky): bug 846647 and bug 828798 fixed a logic problem caused by this patch, so I'll uplift these two bugs as well. No other risk.
String or UUID changes made by this patch: no
Attachment #728910 -
Flags: approval-mozilla-b2g18?
Updated•12 years ago
|
Attachment #728903 -
Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Comment 18•12 years ago
|
||
(In reply to Eric Chou [:ericchou] [:echou] from comment #17)
> Created attachment 728910 [details] [diff] [review]
> patch 2: for b2g18, r=echou
>
> NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to
> better understand the B2G approval process and landings.
>
> [Approval Request Comment]
> Bug caused by (feature/regressing bug #): no
> User impact if declined: would miss a Bluetooth HFP feature which is
> neccesary for certification
> Testing completed: mozilla-central
> Risk to taking this patch (and alternatives if risky): bug 846647 and bug
> 828798 fixed a logic problem caused by this patch, so I'll uplift these two
> bugs as well. No other risk.
> String or UUID changes made by this patch: no
I've sent uplift request for bug 828798, and we should uplift bug 846647 after this bug and bug 828798 are both merged into b2g18.
Comment 19•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/b9a0fc5024a2
https://hg.mozilla.org/releases/mozilla-b2g18/rev/ceae69d43d5c
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → wontfix
status-firefox20:
--- → wontfix
status-firefox21:
--- → fixed
Comment 20•12 years ago
|
||
Comment on attachment 728910 [details] [diff] [review]
patch 2: for b2g18, r=echou
Approving low risk HFB patches to bring us closer to spec.
Attachment #728910 -
Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Comment 21•12 years ago
|
||
This bug(and other 9 bugs) block Bluetooth certification. So, these bugs need to be marked as tef+ and landed to v1.0.1 in order to pass Bluetooth certification:
bug 827255
bug 827212
bug 827266
bug 828175
bug 823346
bug 827230
bug 828798
bug 835740
bug 846647
bug 828160
So, mark these bugs as tef?. These fixes have some dependency and it would be better to have them landed in a specific order. Gina has a good view on this.
blocking-b2g: --- → tef?
Assignee | ||
Comment 22•12 years ago
|
||
I recommend to land these patches in the following order:
01. bug827204
02. bug827255
03. bug823346
04. bug827230
05. bug828798
06. bug827212, patch 1
06. bug827212, patch 2
07. bug827266
08. bug828175
09. bug846647
10. bug825861
11. bug825851
12. bug835740
I'm going to attach patches for b2g18_v1_0_1 for each bug. Please land them in the above order. There should be no conflict and feel free to let me know if I can be any help.
Assignee | ||
Comment 23•12 years ago
|
||
Assignee | ||
Comment 24•12 years ago
|
||
Comment 25•12 years ago
|
||
tef- for now until tef release partner confirms this is blocking BT cert.
blocking-b2g: tef? → -
Comment 26•12 years ago
|
||
Seems it is confirmed it blocks BT cer as per bug 868347
blocking-b2g: - → tef+
Assignee | ||
Comment 27•12 years ago
|
||
v1.0.1 patch updated.
Attachment #738767 -
Attachment is obsolete: true
Assignee | ||
Comment 28•12 years ago
|
||
v1.0.1 patch updated.
Attachment #738768 -
Attachment is obsolete: true
Assignee | ||
Comment 29•12 years ago
|
||
Ryan, I've updated all patches. Please land them in the following order, thanks.
01. bug827204
02. bug827255
(03. bug823346 has been landed on v1.0.1)
04. bug827230
05. bug828798
06. bug827212, patch 1
06. bug827212, patch 2
07. bug827266
08. bug828175
09. bug846647
10. bug825861
11. bug825851
12. bug835740
Comment 30•12 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•