Merge "Fixed accessibility navigation gesture sound volume"

main
Ken Wakasa 2011-07-21 13:21:11 -07:00 committed by Android (Google) Code Review
commit 8721398ec0
1 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,8 @@ public class AccessibleInputMethodServiceProxy implements AccessibleKeyboardActi
*/ */
private static final long VIBRATE_KEY_CLICK = 50; private static final long VIBRATE_KEY_CLICK = 50;
private static final float FX_VOLUME = -1.0f;
private InputMethodService mInputMethod; private InputMethodService mInputMethod;
private Vibrator mVibrator; private Vibrator mVibrator;
private AudioManager mAudioManager; private AudioManager mAudioManager;
@ -143,7 +145,7 @@ public class AccessibleInputMethodServiceProxy implements AccessibleKeyboardActi
*/ */
private void sendDownUpKeyEvents(int keyCode) { private void sendDownUpKeyEvents(int keyCode) {
mVibrator.vibrate(VIBRATE_KEY_CLICK); mVibrator.vibrate(VIBRATE_KEY_CLICK);
mAudioManager.playSoundEffect(AudioManager.FX_KEY_CLICK); mAudioManager.playSoundEffect(AudioManager.FX_KEYPRESS_STANDARD, FX_VOLUME);
mInputMethod.sendDownUpKeyEvents(keyCode); mInputMethod.sendDownUpKeyEvents(keyCode);
} }