Closed
Bug 1200124
Opened 9 years ago
Closed 9 years ago
Correct PBAP order mapping
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(blocking-b2g:2.2r+, firefox43 fixed, b2g-v2.2r fixed, b2g-master fixed)
People
(Reporter: ben.tian, Assigned: ben.tian)
References
Details
Attachments
(4 files, 1 obsolete file)
5.44 KB,
patch
|
shawnjohnjr
:
review+
|
Details | Diff | Splinter Review |
7.79 KB,
patch
|
shawnjohnjr
:
review+
|
Details | Diff | Splinter Review |
5.45 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
8.01 KB,
patch
|
Details | Diff | Splinter Review |
The order mapping doesn't follow section 6.2.1 PBAP spec 1.2. 0x00 = indexed 0x01 = alphanumeric 0x02 = phonetic Also replace nsString with uint32_t for parameter passing to avoid such string mismatch error.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee: nobody → btian
Attachment #8654726 -
Flags: review?(shuang)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8654727 -
Flags: review?(shuang)
Attachment #8654726 -
Flags: review?(shuang) → review+
Comment on attachment 8654727 [details] [diff] [review] [2.2r] Patch 2 (v1): Pass order and search key with uint32_t instead of nsString to avoid string mismatch error Review of attachment 8654727 [details] [diff] [review]: ----------------------------------------------------------------- Hi Ben, Thanks for fixing this. Only one thing I think we shall handle it in BluetoothPbapManager instead of BluetoothAdapter. Do you agree? ::: dom/bluetooth/BluetoothAdapter.cpp @@ +1173,5 @@ > } else if (name.EqualsLiteral("order")) { > + using namespace mozilla::dom::vCardOrderTypeValues; > + uint32_t order = > + value.get_uint32_t() < ArrayLength(strings) ? value.get_uint32_t() > + : 0; // default: indexed Honestly I think the error handling (here the unexpected value and use default value "0, indexed") shall be handled in BluetoothPbapManager, not BluetoothAdapter. BluetoothPbapManager shall know PBAP logic and BluetoothAdapter shall simply compose |BluetoothVCardListingEventInit| event. Doe it make sense to you? @@ +1179,5 @@ > + } else if (name.EqualsLiteral("searchKey")) { > + using namespace mozilla::dom::vCardSearchKeyTypeValues; > + uint32_t searchKey = > + value.get_uint32_t() < ArrayLength(strings) ? value.get_uint32_t() > + : 0; // default: name Ditto.
Attachment #8654727 -
Flags: review?(shuang)
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Shawn Huang [:shawnjohnjr] from comment #3) > Honestly I think the error handling (here the unexpected value and use > default value "0, indexed") shall be handled in BluetoothPbapManager, not > BluetoothAdapter. BluetoothPbapManager shall know PBAP logic and > BluetoothAdapter shall simply compose |BluetoothVCardListingEventInit| > event. Doe it make sense to you? I got your point. The reason I put it in BluetoothAdapter is to use the table stored in BluetoothPbapParameters.webidl. If the logic is in PBAP manager, PBAP manager has to either 1) keep an identical table or 2) access table in BluetoothPbapParameters.webidl to handle unexpected value. Do you prefer option 2)? Also do you think we can remove the tables from BluetoothPbapParameters.webidl?
Flags: needinfo?(shuang)
Option 2) seems to be reasonable. If we removed tables (in this case, vCardOrderType/vCardSearchKeyType), we don't have dictionaries to let Gaia use, right? I think keeping the dictionaries and simply do type-conversion in BluetoothAdapter and do boundary check in BluetoothPbapManager.
Flags: needinfo?(shuang)
Assignee | ||
Comment 6•9 years ago
|
||
Revise based on reviewer's comment.
Attachment #8654727 -
Attachment is obsolete: true
Attachment #8655867 -
Flags: review?(shuang)
Comment on attachment 8655867 [details] [diff] [review] [2.2r] Patch 2: Pass order and search key with uint32_t instead of nsString to avoid string mismatch error, r=shuang Review of attachment 8655867 [details] [diff] [review]: ----------------------------------------------------------------- Code looks good to me. Thank.
Attachment #8655867 -
Flags: review?(shuang) → review+
Assignee | ||
Comment 8•9 years ago
|
||
Upload m-c patch. Blake, can you review the webidl change that corrects order mapping to follow bluetooth Phonebook Access Profile (PBAP) spec as comment 0?
Attachment #8657684 -
Flags: review?(mrbkap)
Assignee | ||
Comment 9•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8655867 -
Attachment description: [2.2r] Patch 2 (v2): Pass order and search key with uint32_t instead of nsString to avoid string mismatch error → [2.2r] Patch 2: Pass order and search key with uint32_t instead of nsString to avoid string mismatch error, r=shuang
Assignee | ||
Updated•9 years ago
|
Attachment #8654726 -
Attachment description: [2.2r] Patch 1 (v1): Correct PBAP order mapping → [2.2r] Patch 1: Correct PBAP order mapping, r=shuang
Updated•9 years ago
|
Attachment #8657684 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 10•9 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f777c9d940b0
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/fa0de2cded57 https://hg.mozilla.org/integration/b2g-inbound/rev/582d68dfb107
Assignee | ||
Comment 12•9 years ago
|
||
Set 2.2r+ blocker since the bug disobeys PBAP spec.
Assignee | ||
Updated•9 years ago
|
Attachment #8654726 -
Attachment description: [2.2r] Patch 1: Correct PBAP order mapping, r=shuang → [2.2r] Patch 1: Correct PBAP order mapping, r=shuang, r=mrbkap
Comment 13•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fa0de2cded57 https://hg.mozilla.org/mozilla-central/rev/582d68dfb107
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S7 (18Sep)
Comment 14•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/44ed5d3a9a19 https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/4b50a718d0e6
You need to log in
before you can comment on or make changes to this bug.
Description
•