am 37af28dd: Enable vibrate on keypress by default

* commit '37af28dd234b64773c0038ac587cac5f99236bd2':
  Enable vibrate on keypress by default
main
Ken Wakasa 2011-09-20 14:14:27 -07:00 committed by Android Git Automerger
commit 30881753c8
4 changed files with 5 additions and 2 deletions

View File

@ -39,6 +39,7 @@
<bool name="config_default_bigram_prediction">false</bool>
<bool name="config_default_compat_recorrection_enabled">true</bool>
<bool name="config_default_sound_enabled">false</bool>
<bool name="config_default_vibration_enabled">true</bool>
<bool name="config_auto_correction_spacebar_led_enabled">true</bool>
<!-- Showing mini keyboard, just above the touched point if true, aligned to the key if false -->
<bool name="config_show_mini_keyboard_at_touched_point">false</bool>

View File

@ -20,7 +20,7 @@
<resources>
<string-array name="keypress_vibration_durations" translatable="false">
<!-- Build.HARDWARE,duration_in_milliseconds -->
<item>herring,4</item>
<item>herring,5</item>
<item>tuna,5</item>
</string-array>
</resources>

View File

@ -32,6 +32,7 @@
<CheckBoxPreference
android:key="vibrate_on"
android:title="@string/vibrate_on_keypress"
android:defaultValue="@bool/config_default_vibration_enabled"
android:persistent="true" />
<CheckBoxPreference
android:key="sound_on"

View File

@ -171,7 +171,8 @@ public class Settings extends InputMethodSettingsActivity
// Get the settings preferences
final boolean hasVibrator = VibratorCompatWrapper.getInstance(context).hasVibrator();
mVibrateOn = hasVibrator && prefs.getBoolean(Settings.PREF_VIBRATE_ON, false);
mVibrateOn = hasVibrator && prefs.getBoolean(Settings.PREF_VIBRATE_ON,
res.getBoolean(R.bool.config_default_vibration_enabled));
mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON,
res.getBoolean(R.bool.config_default_sound_enabled));
mKeyPreviewPopupOn = isKeyPreviewPopupEnabled(prefs, res);