Closed
Bug 964776
Opened 10 years ago
Closed 10 years ago
[Flatfish][Settings] No vibrating alert motor, "Vibrate" option should be removed from Settings
Categories
(Firefox OS Graveyard :: Gaia::Settings, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ericcc, Assigned: yifan)
Details
(Keywords: verifyme, Whiteboard: [flatfish][TCP=polish])
Attachments
(2 files)
GAIA commit e314d089d988f0eb1bef2404858c60b734dc4130 $GAIA_DISTRIBUTION_DIR=distribution_tablet make reset-gaia 1. Open "Settings" -> "Sound" 2. <ISSUE> "Vibrate" existed.
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(frlee)
Reporter | ||
Comment 1•10 years ago
|
||
Comment 2•10 years ago
|
||
flatfish doesn't support Vibration from HW perspective, so vibrate option needs to be removed from setting.
Flags: needinfo?(frlee)
Whiteboard: [Flatfish only] → [Flatfish only][developer+]
Comment 3•10 years ago
|
||
Is this bug anyway related to the Tablet Contribution Program?
Updated•10 years ago
|
Whiteboard: [Flatfish only][developer+] → [flatfish][TCP]
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → yliao
Assignee | ||
Comment 4•10 years ago
|
||
Settings app uses API to check for device functionality support, and show/hide the corresponding setting items relatively. For vibration, it seems there isn't an API that could do it. https://developer.mozilla.org/en-US/docs/Web/API/Navigator.vibrate http://www.w3.org/TR/vibration/#vibration-interface navigator.vibrate() does nothing when a device doesn't support vibration and it still returns true. Tried it on flatfish. Any ideas on checking for device vibration support?
Flags: needinfo?(arthur.chen)
Comment 5•10 years ago
|
||
For feature detection that is not well supported in gecko, a workaround would be using a json file. There is a similar case in settings app where we are unable to detect if the light sensor is available on the device. We added a sensors.json in the end. Please check https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Market_customizations_guide for details.
Flags: needinfo?(arthur.chen)
Assignee | ||
Comment 6•10 years ago
|
||
Thank you! I assume that means we would need to create another json such as vibrator.json for this, or simply put a key value pair for vibration support in sensors.json. What's your suggestion on it?
Flags: needinfo?(arthur.chen)
Comment 7•10 years ago
|
||
As this is actually a rare case, I would prefer placing it in the same file but rename it with a more general name.
Flags: needinfo?(arthur.chen)
Assignee | ||
Comment 8•10 years ago
|
||
How about device-features.json? Should we open another bug to make the naming change and then come back to this one?
Flags: needinfo?(arthur.chen)
Comment 9•10 years ago
|
||
The name is good to me. I think doing the rename in this bug is fine.
Flags: needinfo?(arthur.chen)
Updated•10 years ago
|
Whiteboard: [flatfish][TCP] → [flatfish][TCP=polish]
Assignee | ||
Comment 10•10 years ago
|
||
Modifications: * Rename customization/sensors.json to customization/device-features.json * Modify build.js to replace sensors.json with device-features.json * Show/Hide 'Vibrate' checkbox according to the 'vibration' value in device-features.json * Update .gitignore and integration test Once it's landed, I will update the documentations as well. I found these 2 relevant links. https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Market_customizations_guide#sensors.json https://wiki.mozilla.org/FirefoxOS/TCP/Patching#Start_to_build_flatfish Customization example, same applies to devices without vibration support: 1. Create a customization folder with device-features.json in it. 2. Code {"vibration":false} in device-featrues.json for flatfish. 3. Add GAIA_DISTRIBUTION_DIR=<customization-path> when building gaia for flatfish.
Attachment #8472782 -
Flags: review?(arthur.chen)
Comment 11•10 years ago
|
||
Comment on attachment 8472782 [details] [review] pull request Good job! Thank you for taking the effort. r=me with the comment addressed.
Attachment #8472782 -
Flags: review?(arthur.chen) → review+
Assignee | ||
Comment 12•10 years ago
|
||
Thank you! Console logs removed. Merged into master https://github.com/mozilla-b2g/gaia/pull/22861 TBPL https://tbpl.mozilla.org/?rev=430912076404fb503fb1402728b0dbc2fc3c93d1&tree=Gaia-Try MDN updated https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Market_customizations_guide#device-features.json
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.
Description
•