Closed Bug 1200103 Opened 10 years ago Closed 10 years ago

Bluetooth address not shown in Settings App

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pauljt, Assigned: martianwars, Mentored)

Details

(Whiteboard: [good first bug][mentor-lang=zh][lang=js])

Attachments

(2 files, 1 obsolete file)

The bluetooth mac address is supposed to be shown in the settings app under Settings-> Device Information -> More Information. Brsun informed me that its not shown when bluetooth is disabled. Enabling bluetooth fixed this, and it shows the address. Maybe when bluetooth is disabled we should add a string, "Bluetooth disabled" so its clear that the address doesn't show when bluetooth is turned off.
looks like a good idea because we cant get address when BT is disabled. Will set as good first bug if UX has no objection to it.
Flags: needinfo?(hhsu)
Yes, I agree with Paul here. Thanks Paul for pointing this out :)
Flags: needinfo?(hhsu)
Mentor: gasolin
Whiteboard: [good first bug][mentor-lang=zh]
Whiteboard: [good first bug][mentor-lang=zh] → [good first bug][mentor-lang=zh][lang=js]
(In reply to Fred Lin [:gasolin] from comment #1) > looks like a good idea because we cant get address when BT is disabled. > > Will set as good first bug if UX has no objection to it. Hi Fred, I was interested in solving this bug. I tried looking for the relevant code but couldn't do so. Which files should I look at?
hint: pages are organized in settings/elements, and `Device Information > More Information` would be as `about_more_info.html` js code are organized in `settings/js/panels/about_more_info/`, you can check if bluetooth address is exist , or show a string instead. You can use element.setAttribute('data-l10n-id', string_id to set a text string to certain html tag
Attached file Adding Bluetooth disable message. (obsolete) —
Not so sure about the workflow of the code. I guessed that address takes up a null value / empty string in the case of a disabled bluetooth.
Attachment #8656178 - Flags: review?(gasolin)
Assignee: nobody → kalpeshk2011
Comment on attachment 8656178 [details] [review] Adding Bluetooth disable message. Thanks for providing the patch! Please address comments in github and set review again when you are ready.
Attachment #8656178 - Flags: review?(gasolin)
Not so sure about the if condition. Did the rest as you mentioned.
Attachment #8656178 - Attachment is obsolete: true
Attachment #8656379 - Flags: review?(gasolin)
Comment on attachment 8656379 [details] [review] Bluetooth disable string patch Kalpesh, thanks for update the patch, it works on device well now. But we have to correct the unit tests to land code into gaia. Please address comments in github and set review again. (little bugzilla tip) you can use same attachment to set review by click the `detail` hyperlink at right of the attachment.
Attachment #8656379 - Flags: review?(gasolin)
Attachment #8656379 - Flags: review?(gasolin)
@gasolin - I received an error on the following tests :- https://pastebin.mozilla.org/8845117 I see errors on the following tests here. 1. should show bluetooth address 2. should use correct bluetooth module bluetooth version 1 3. should use correct bluetooth module bluetooth version 2 What could I do?
please open unit/panels/about_more_info/hardware_info_test.js , find related tests and fix them
Attachment #8656379 - Flags: review?(gasolin)
Comment on attachment 8656379 [details] [review] Bluetooth disable string patch It passed all tests. Do let me know the next steps
Attachment #8656379 - Flags: review?(gasolin)
Sorry the fix for unit test is not a proper fix, if test runs into `assert.isTrue(false);` statement, it means _loadBluetoothAddress is rejected (with promise). You could check the code and find out why _loadBluetoothAddress is rejected.
(_loadBluetoothAddress supposed to return resolve as result) I'll check and give more concrete advice later.
Attachment #8656379 - Flags: review?(gasolin)
@gasolin :- I successfully set up the enviroment locally and noticed the following :- The variable name in must be "fields" and nothing else. I managed to pass the tests locally. Will submit a review request once the tests pass treeherder
Comment on attachment 8656379 [details] [review] Bluetooth disable string patch Passed the original unit tests successfully. :)
Attachment #8656379 - Flags: review?(gasolin)
Comment on attachment 8656379 [details] [review] Bluetooth disable string patch Thanks for keeping update the patch! The patch fixed tests and works well, but for maintainability I think we should rename `fields` to something more meaningful as you did in previous change. Please address the last comment in github and we could land this change soon.
Attachment #8656379 - Flags: review?(gasolin)
Comment on attachment 8656379 [details] [review] Bluetooth disable string patch Did the mentioned changed.
Attachment #8656379 - Flags: review?(gasolin)
Comment on attachment 8656379 [details] [review] Bluetooth disable string patch Looks good to me, thanks and congrats for the first gaia merge!
Attachment #8656379 - Flags: review?(gasolin) → review+
The last thing is squash your commits into single commit, please check http://eragonj.me/blog/fxos-why-we-need-to-squash-commits.html to squash commits
Comment on attachment 8656379 [details] [review] Bluetooth disable string patch Done with the squashing. Could I add the checkin needed?
Thanks! I'll help you merge the commit once gaia repo is open :)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: