am c759ed68: fw/policy/base:Phonewindowmanager: Make vkey button haptics part of global haptic setting

Merge commit 'c759ed684857a085e5cf74f5a62bc98e78abd660'

* commit 'c759ed684857a085e5cf74f5a62bc98e78abd660':
  fw/policy/base:Phonewindowmanager: Make vkey button haptics part of global haptic setting
This commit is contained in:
Dan Murphy
2009-09-27 15:38:27 -07:00
committed by Android Git Automerger

View File

@@ -2184,7 +2184,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
public void keyFeedbackFromInput(KeyEvent event) {
if (event.getAction() == KeyEvent.ACTION_DOWN
&& (event.getFlags()&KeyEvent.FLAG_VIRTUAL_HARD_KEY) != 0) {
mVibrator.vibrate(mVirtualKeyVibePattern, -1);
if (Settings.System.getInt(mContext.getContentResolver(),
Settings.System.HAPTIC_FEEDBACK_ENABLED, 0) != 0) {
mVibrator.vibrate(mVirtualKeyVibePattern, -1);
}
}
}