Enable vibrate on keypress by default

bug: 5337363
Change-Id: I14c95d27dd236d0a43e64a46ae6fbf9f2a97a3da
main
Ken Wakasa 2011-09-20 20:16:11 +09:00
parent 34a9831811
commit 37af28dd23
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);