// TODO: make this private when LatinIME does not call it any more public void vibrate(final View viewToPerformHapticFeedbackOn) { if (!mSettingsValues.mVibrateOn) { return; } if (mSettingsValues.mKeypressVibrationDuration < 0) { // Go ahead with the system default if (viewToPerformHapticFeedbackOn != null) { viewToPerformHapticFeedbackOn.performHapticFeedback( HapticFeedbackConstants.KEYBOARD_TAP, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING); } } else if (mVibratorUtils != null) { mVibratorUtils.vibrate(mSettingsValues.mKeypressVibrationDuration); } }