Make the keyboard sound on by default for xlarge screens.

Also change the name of the default value for re-correction for
consistency with other constant names.

Bug: 3426884

Change-Id: I615ba640fb17e6d7514b8a0e4f52028eb0e23908
diff --git a/java/res/values-xlarge/config.xml b/java/res/values-xlarge/config.xml
index 40fdce0..f075b1b 100644
--- a/java/res/values-xlarge/config.xml
+++ b/java/res/values-xlarge/config.xml
@@ -32,6 +32,7 @@
     <bool name="config_digit_popup_characters_enabled">false</bool>
     <!-- Whether or not Popup on key press is enabled by default -->
     <bool name="config_default_popup_preview">false</bool>
+    <bool name="config_default_sound_enabled">true</bool>
     <bool name="config_use_spacebar_language_switcher">false</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">true</bool>
diff --git a/java/res/values/config.xml b/java/res/values/config.xml
index ceb4f12..bf42589 100644
--- a/java/res/values/config.xml
+++ b/java/res/values/config.xml
@@ -20,7 +20,6 @@
 
 <resources>
     <bool name="config_swipeDisambiguation">true</bool>
-    <bool name="default_recorrection_enabled">true</bool>
     <bool name="config_long_press_comma_for_settings_enabled">true</bool>
     <bool name="config_enable_show_settings_key_option">true</bool>
     <bool name="config_enable_show_subtype_settings">true</bool>
@@ -39,6 +38,8 @@
     <!-- Default values for whether quick fixes and bigram suggestions are activated -->
     <bool name="config_default_quick_fixes">true</bool>
     <bool name="config_default_bigram_suggestions">true</bool>
+    <bool name="config_default_recorrection_enabled">true</bool>
+    <bool name="config_default_sound_enabled">false</bool>
     <bool name="config_use_spacebar_language_switcher">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>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 9ea801e..d031415 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -38,6 +38,7 @@
         <CheckBoxPreference
                 android:key="sound_on"
                 android:title="@string/sound_on_keypress"
+                android:defaultValue="@bool/config_default_sound_enabled"
                 android:persistent="true"
                 />
 
@@ -53,7 +54,7 @@
                 android:title="@string/prefs_enable_recorrection"
                 android:summary="@string/prefs_enable_recorrection_summary"
                 android:persistent="true"
-                android:defaultValue="@bool/default_recorrection_enabled"
+                android:defaultValue="@bool/config_default_recorrection_enabled"
                 />
 
         <ListPreference
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index beb950c..181043d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -359,9 +359,9 @@
         // but always use the default setting defined in the resources.
         if (res.getBoolean(R.bool.config_enable_show_recorrection_option)) {
             mReCorrectionEnabled = prefs.getBoolean(Settings.PREF_RECORRECTION_ENABLED,
-                    res.getBoolean(R.bool.default_recorrection_enabled));
+                    res.getBoolean(R.bool.config_default_recorrection_enabled));
         } else {
-            mReCorrectionEnabled = res.getBoolean(R.bool.default_recorrection_enabled);
+            mReCorrectionEnabled = res.getBoolean(R.bool.config_default_recorrection_enabled);
         }
 
         mConfigEnableShowSubtypeSettings = res.getBoolean(
@@ -1950,7 +1950,7 @@
         } else if (Settings.PREF_RECORRECTION_ENABLED.equals(key)) {
             mReCorrectionEnabled = sharedPreferences.getBoolean(
                     Settings.PREF_RECORRECTION_ENABLED,
-                    mResources.getBoolean(R.bool.default_recorrection_enabled));
+                    mResources.getBoolean(R.bool.config_default_recorrection_enabled));
         }
     }
 
@@ -2121,7 +2121,8 @@
         Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
         mVibrateOn = vibrator != null && vibrator.hasVibrator()
                 && prefs.getBoolean(Settings.PREF_VIBRATE_ON, false);
-        mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON, false);
+        mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON,
+                mResources.getBoolean(R.bool.config_default_sound_enabled));
 
         mPopupOn = isPopupEnabled(prefs);
         mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true);