Closed Bug 986375 Opened 11 years ago Closed 11 years ago

[Bluetooth] Define command strings in BluetoothHfpManager::SendCommand() as constant

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
1.4 S4 (28mar)

People

(Reporter: ben.tian, Assigned: yrliou)

Details

Attachments

(1 file, 2 obsolete files)

Per bug 981458 comment 10, we should define command strings in SendCommand() as constant to avoid bugs of string typo.
Jocelyn, please help on this bug. This is a good first bug to practice.
Assignee: nobody → joliu
Command strings have been defined to avoid typo while calling BluetoothHfpManager::SendCommand(). Tested and passed TC_AG_PSI_BV_03_I PTS test case.
Attachment #8395567 - Flags: review?(btian)
Sorry, I wrote the wrong test case name in previous comment. The PTS test case was TC_AG_TWC_BV_01_I.
Comment on attachment 8395567 [details] [diff] [review] Patch1(v1) Bug 986375 : Define command strings for SendCommand Only module owner (Eric) and peer (Gina) can review. Give f+ and set r? for Eric.
Attachment #8395567 - Flags: review?(echou)
Attachment #8395567 - Flags: review?(btian)
Attachment #8395567 - Flags: feedback+
Comment on attachment 8395567 [details] [diff] [review] Patch1(v1) Bug 986375 : Define command strings for SendCommand Review of attachment 8395567 [details] [diff] [review]: ----------------------------------------------------------------- Overall looks good! Please address the nit and request for review again. Another thing I would like to point out is the patch summary. Since those constants are not only defined for SendCommand(), maybe "Use defined constants to represent HFP result codes to avoid typo" would be more clear. ::: dom/bluetooth/bluez/BluetoothHfpManager.cpp @@ +67,5 @@ > +#define CIND_RESPONSE "+CIND: " > +#define CLCC_RESPONSE "+CLCC: " > +#define BRSF_RESPONSE "+BRSF: " > +#define VGS_RESPONSE "+VGS: " > +#define CME_ERROR_RESPONSE "+CME ERROR: " nit: I have a suggestion about the naming of these #defines. Personally I prefer using RESPONSE_CIEV, RESPONSE_CIND more than CIEV_RESPONSE, CIND_RESPONSE I have no strong reason but it's more like a convention.
Hi Eric, Thanks for the review comments. I have addressed them in Patch1(v2).
Attachment #8396899 - Flags: review?(echou)
Comment on attachment 8396899 [details] [diff] [review] Patch1(v2) Bug-986375 : Use defined constants for HFP result code to avoid typo Review of attachment 8396899 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Thanks for cleaning this up. Please obsolete your first patch, and be sure the commit message of this patch follows the committing rules before request for checkin-needed. (https://developer.mozilla.org/en-US/docs/Developer_Guide/Committing_Rules_and_Responsibilities)
Attachment #8396899 - Flags: review?(echou) → review+
Attachment #8395567 - Attachment is obsolete: true
Attachment #8396899 - Attachment is obsolete: true
Attachment #8395567 - Flags: review?(echou)
Status: NEW → UNCONFIRMED
Ever confirmed: false
Keywords: checkin-needed
welcome to mozilla! landed this on b2g-inbound https://hg.mozilla.org/integration/b2g-inbound/rev/9eff1a0854fb
Please don't forget to clear checkin-needed when pushing. Or better yet, use mcMerge to mark them ;)
Flags: needinfo?(cbook)
Keywords: checkin-needed
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S4 (28mar)
Flags: needinfo?(cbook)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: