Closed Bug 950404 Opened 11 years ago Closed 9 years ago

Missing option to disable home button vibration

Categories

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

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 885716

People

(Reporter: svetlana, Unassigned)

Details

Attachments

(1 file)

Steps To Reproduce:
1) Settings → Sound → Untick vibration.
2) Press home button.

Expected: No sound.
Actual sound: Vibration.
Some users on Geeskphone devices would like to see this, too.
Since my hamachi is my only device and the simulator does not offer options to test hardware features (like vibration) I wrote the unit test as an applied carbon copy of the dialer_ringer_test.js. I couldn't find resources about the testing functions, so I hope, the test will pass. _6a68 offered to test it.

This is my first patch, please be kind :)

_6a68 and kgrandon were so kind and offered some help while writing it on IRC.
Flags: needinfo?(6a68)
Congrats on your first patch, Ryuno-Ki!

Notice that the pull request page says that the Travis build failed. If you click through to the Travis build, you can see that jshint failed on your test file. This needs to be addressed. If you install jshint, you'll be able to catch this locally at commit time; doing `npm install` from the top-level of the gaia repo should install all the stuff you need.

This patch doesn't fix the underlying problem; after I follow the STR above, I still get a vibration when I hit the home button.

Vivien, any idea why this patch doesn't work (as it looks like it should)?
Flags: needinfo?(6a68) → needinfo?(21)
Component: General → Gaia::System
Hey there - Looks like Travis is unhappy, the unit tests failed:

https://travis-ci.org/mozilla-b2g/gaia/builds/22808912

Once you've fixed the tests, push the additional commit(s) to your branch, and Travis will start a new run automatically.
Flags: needinfo?(andre.jaenisch)
(In reply to Jared Hirsch [:_6a68] [@6a68] from comment #3)
> Congrats on your first patch, Ryuno-Ki!
> 
> Notice that the pull request page says that the Travis build failed. If you
> click through to the Travis build, you can see that jshint failed on your
> test file. This needs to be addressed. If you install jshint, you'll be able
> to catch this locally at commit time; doing `npm install` from the top-level
> of the gaia repo should install all the stuff you need.
> 
> This patch doesn't fix the underlying problem; after I follow the STR above,
> I still get a vibration when I hit the home button.
> 
> Vivien, any idea why this patch doesn't work (as it looks like it should)?

The vibration setting is not really intended to disable the home button vibration. Looking at the patch it seems like it relies on |if ('vibrate' in navigator)| which will not disable the vibration of the home button since this condition will always be true on FFOS.

That said I understand why some user would like that, so you should consider adding a new setting in one of the Settings panel, and map this setting to enable/disable the vibration code into hardware_button.js.

I suggest that you look for usage of SettingsListener in apps/system/js/*.
Flags: needinfo?(21)
Thanks for the input, Vivien.

I'm working with Jared together on the PR on GitHub. We agreed to comment on the commits there.
Flags: needinfo?(andre.jaenisch)
(In reply to andre.jaenisch from comment #6)
> I'm working with Jared together on the PR on GitHub. We agreed to comment on
> the commits there.

Just FYI, it's best to keep the majority of the discussion in this bug, except where we're directly discussing specific lines in the patch, which tends to wind up in github.
Bump :-)

Andre, still interested in hacking on this bug? If so, let me know if you're stuck on anything.
Flags: needinfo?(andre.jaenisch)
Yes, I'm interested. But I'm lacking time. You know, real life … Hacking must not influence my studies :(
Flags: needinfo?(andre.jaenisch)
I already did this patch and reported the issue many time ago. but then the github issues got purged and I lost my changes. I would love to see this fixed before 2.0
(In reply to pancake from comment #10)
> I already did this patch and reported the issue many time ago. but then the
> github issues got purged and I lost my changes. I would love to see this
> fixed before 2.0

Do you have a PR/issue to point us, too?

:_6a68 I'm still interested but have to go through the whole setup process, again. This time, I'll blog about it :)

What prevents me from it is the confusion about what tool is recommended today, resp. which one is going to be supported (c.f. https://groups.google.com/d/msg/mozilla.dev.gaia/F2k4yFip9pk/Nx5oPhlMRXoJ)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: