Closed Bug 727381 Opened 12 years ago Closed 12 years ago

Haptic feedback clobbers vibrations started via the vibrator API

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 13

People

(Reporter: paul, Assigned: justin.lebar+bug)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I use this test case:

<button onclick="navigator.mozVibrate(2000)">Doesn't work</button>
<button onclick="navigator.mozVibrate(2000); alert(42)">Work</button>

Fennec nightly (2012-02-15), HTC Desire HD + ICS.
(works with Galaxy Nexus + ICS)
What the heck is going on here?
Assignee: nobody → justin.lebar+bug
On my ICS device, vibrate(2000) causes a very brief vibration.
I think this is an ICS-only problem; the vibrator works fine on my SGSII running 2.3.
There's no cancelVibrate() call being sent, so I wonder why our vibration is being cancelled.
(In reply to Paul Rouget [:paul] from comment #1)
> (works with Galaxy Nexus + ICS)

Do you mean, it works as expected, or that you're able to reproduce the problem?

Can we talk specific versions of Android?  I can reproduce on my Nexus S running 4.0.3, kernel 3.0.8-gb55e9ac android-build@apa28 #1.
Aha.  I think it's the haptic feedback.  When you click a button, someone is doing a small vibration to let you know that you've clicked it.  That's overwriting the vibration.
Summary: Vibration API: mozVibrate only works if followed by an alert() → Haptic feedback clobbers vibrations started via the vibrator API
Assignee: justin.lebar+bug → nobody
Product: Core → Fennec Native
QA Contact: general → general
Jonas, remember when we worried about pages nuking each others' navigator.vibrate() calls?  I never suspected Firefox would be the first offender!
Attached patch Patch v1Splinter Review
Attachment #597550 - Flags: review?(mark.finkle)
Assignee: nobody → justin.lebar+bug
Comment on attachment 597550 [details] [diff] [review]
Patch v1

Passing to Brad. Looks OK to me but he is better for reviewing this.
Attachment #597550 - Flags: review?(mark.finkle) → review?(blassey.bugs)
Attachment #597550 - Flags: review?(blassey.bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/41c96fa5d43f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
(thank you)
Blocks: 728254
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: