Closed
Bug 1203821
Opened 10 years ago
Closed 10 years ago
[cleanup] Simplify BluetoothPbapManager functions
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(blocking-b2g:2.2r+, firefox44 fixed, b2g-v2.2r fixed, b2g-master affected)
People
(Reporter: ben.tian, Assigned: ben.tian)
References
Details
Attachments
(5 files, 5 obsolete files)
|
10.70 KB,
patch
|
shawnjohnjr
:
review+
|
Details | Diff | Splinter Review |
|
15.03 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.47 KB,
patch
|
shawnjohnjr
:
review+
|
Details | Diff | Splinter Review |
|
14.19 KB,
patch
|
Details | Diff | Splinter Review | |
|
13.52 KB,
patch
|
Details | Diff | Splinter Review |
Simplify BluetoothPbapManager functions as following:
- add utility function to convert big/little endianness
- revise BluetoothPbapManager with above utility functions
- integrate |PullPhonebook|, |PullvCardListing|, and |PullvCardEntry| into one function to fire PBAP request for gaia.
| Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → btian
Attachment #8659708 -
Flags: review?(shuang)
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8659709 -
Flags: review?(shuang)
| Assignee | ||
Updated•10 years ago
|
Attachment #8659709 -
Flags: review?(shuang)
| Assignee | ||
Updated•10 years ago
|
Attachment #8659708 -
Flags: review?(shuang)
| Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8659708 -
Attachment is obsolete: true
| Assignee | ||
Updated•10 years ago
|
Attachment #8670671 -
Attachment description: Patch 1 (v1): Add utility functions to convert big/little endianness and revise BluetoothPbapManager accordingly → Patch 1 (v2): Add utility functions to convert big/little endianness and revise BluetoothPbapManager accordingly
| Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8670671 -
Attachment is obsolete: true
| Assignee | ||
Updated•10 years ago
|
Attachment #8670673 -
Flags: review?(shuang)
| Assignee | ||
Updated•10 years ago
|
Attachment #8659709 -
Flags: review?(shuang)
| Assignee | ||
Updated•10 years ago
|
Attachment #8659709 -
Attachment is obsolete: true
Attachment #8659709 -
Flags: review?(shuang)
| Assignee | ||
Updated•10 years ago
|
Attachment #8670671 -
Attachment is obsolete: false
Attachment #8670671 -
Flags: review?(shuang)
Comment on attachment 8670671 [details] [diff] [review]
[final] Patch 1: Add utility functions to convert big/little endianness and revise BluetoothPbapManager accordingly, r=shuang
Review of attachment 8670671 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bluetooth/bluedroid/BluetoothPbapManager.cpp
@@ +251,5 @@
>
> ReplyToDisconnectOrAbort();
> AfterPbapDisconnected();
> break;
> case ObexRequestCode::SetPath: {
nit:Please fix indentation. Left shitf two spaces. Although BluetoothDaemonHelpers do indent 4 spaces after brace.
@@ +514,5 @@
>
> switch (aTagId) {
> case AppParameterTag::Order: {
> + using namespace mozilla::dom::vCardOrderTypeValues;
> + uint32_t order =
nit:Please fix indentation. Left shift two spaces.
@@ +524,2 @@
> case AppParameterTag::SearchProperty: {
> + using namespace mozilla::dom::vCardSearchKeyTypeValues;
nit:Please fix indentation.
@@ +537,5 @@
> + // MDN:Internal_strings suggestion
> + AppendNamedValue(aValues, "searchText", nsCString((char *) buf));
> + break;
> + case AppParameterTag::MaxListCount: {
> + uint16_t maxListCount = ReadLittleEndianUInt16(buf);
nit:Please fix indentation.
@@ +558,5 @@
> + case AppParameterTag::Format:
> + AppendNamedValue(aValues, "format", static_cast<bool>(buf[0]));
> + break;
> + case AppParameterTag::vCardSelector: {
> + bool hasSelectorOperator = aHeader.GetAppParameter(
nit:Please fix indentation.
::: dom/bluetooth/common/BluetoothUtils.cpp
@@ +604,5 @@
> aArray.InsertElementAt(aIndex, BluetoothNamedValue(name, aValue));
> }
>
> +uint16_t
> +ChangeEndiannessUInt16(uint16_t aValue)
I prefer to use 'Convert', s/Change/Convert.
Attachment #8670671 -
Flags: review?(shuang) → review+
| Assignee | ||
Updated•10 years ago
|
Attachment #8670673 -
Flags: review?(shuang)
| Assignee | ||
Comment 6•10 years ago
|
||
Rebase on bug 1212725.
Attachment #8670673 -
Attachment is obsolete: true
Attachment #8672451 -
Flags: review?(shuang)
Attachment #8672451 -
Flags: feedback?(6jamin)
Comment 7•10 years ago
|
||
Comment on attachment 8672451 [details] [diff] [review]
Patch 2 (v3): Notify gaia of PBAP request with one integrated function
Review of attachment 8672451 [details] [diff] [review]:
-----------------------------------------------------------------
The patch looks great. :)
Thank Ben for providing this patch.
::: dom/bluetooth/bluedroid/BluetoothPbapManager.cpp
@@ +294,5 @@
> ReplyToSetPath();
> break;
> }
> case ObexRequestCode::Get:
> + /**
Would you mind to use '/*' instead of '/**' here ?
Mozilla coding style [1] suggests to use JavaDoc-style comments [2].
According to [2], a doc comment must precede a class, field, constructor or method declaration.
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
[2] http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#format
@@ +455,5 @@
> + // ... PullvCardListing function uses relative paths. An empty name header
> + // may be sent to retrieve the vCard Listing object of the current folder.
> + name = name.IsEmpty() ? mCurrentPath
> + : mCurrentPath + NS_LITERAL_STRING("/") + name;
> +
Should we remove this empty line ?
Attachment #8672451 -
Flags: feedback?(6jamin) → feedback+
Comment on attachment 8672451 [details] [diff] [review]
Patch 2 (v3): Notify gaia of PBAP request with one integrated function
Review of attachment 8672451 [details] [diff] [review]:
-----------------------------------------------------------------
I would r+ this.
Attachment #8672451 -
Flags: review?(shuang) → review+
| Assignee | ||
Comment 9•10 years ago
|
||
Revise per Jamin's feedback and rebase on bug 1212729.
Attachment #8672451 -
Attachment is obsolete: true
| Assignee | ||
Updated•10 years ago
|
Attachment #8670671 -
Attachment description: Patch 1 (v2): Add utility functions to convert big/little endianness and revise BluetoothPbapManager accordingly → [final] Patch 1: Add utility functions to convert big/little endianness and revise BluetoothPbapManager accordingly, r=shuang
| Assignee | ||
Comment 10•10 years ago
|
||
Sync comment and log with 2.2r file.
Attachment #8672531 -
Attachment is obsolete: true
| Assignee | ||
Comment 11•10 years ago
|
||
Comment 12•10 years ago
|
||
| Assignee | ||
Comment 13•10 years ago
|
||
Attachment #8672909 -
Flags: review?(shuang)
| Assignee | ||
Comment 14•10 years ago
|
||
(In reply to Ben Tian [:btian] from comment #13)
> Created attachment 8672909 [details] [diff] [review]
> Patch 3 (v1): Restore missing bug 1212729 change
Comment 9 patch missed one section of bug 1212729 change. This patch 3 restores it.
Comment on attachment 8672909 [details] [diff] [review]
Patch 3 (v1): Restore missing bug 1212729 change
Thanks for finding this piece.
Attachment #8672909 -
Flags: review?(shuang) → review+
| Assignee | ||
Comment 17•10 years ago
|
||
| Assignee | ||
Comment 18•10 years ago
|
||
| Assignee | ||
Comment 19•10 years ago
|
||
Set 2.2r blocker for required bluetooth feature PBAP.
Comment 20•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a3b4565c0ee5
https://hg.mozilla.org/mozilla-central/rev/4b163ef1abb2
https://hg.mozilla.org/mozilla-central/rev/1904c51c0cc3
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S9 (16Oct)
| Assignee | ||
Comment 21•10 years ago
|
||
Note for 2.2r only two patches is required (comment 17 and 18) since 2.2r patch 2 already integrates m-c patch 3.
(In reply to Carsten Book [:Tomcat] from comment #20)
> https://hg.mozilla.org/mozilla-central/rev/a3b4565c0ee5
> https://hg.mozilla.org/mozilla-central/rev/4b163ef1abb2
> https://hg.mozilla.org/mozilla-central/rev/1904c51c0cc3
Comment 22•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•