aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values-cs/bools.xml22
-rw-r--r--res/values-de/bools.xml22
-rw-r--r--res/values-es/bools.xml22
-rw-r--r--res/values-fr/bools.xml22
-rw-r--r--res/values-it/bools.xml22
-rw-r--r--res/values-nl/bools.xml22
-rw-r--r--res/values-pl/bools.xml22
-rw-r--r--res/values/bools.xml26
-rw-r--r--res/xml/prefs.xml2
-rw-r--r--src/com/android/inputmethod/latin/LatinIME.java3
10 files changed, 183 insertions, 2 deletions
diff --git a/res/values-cs/bools.xml b/res/values-cs/bools.xml
new file mode 100644
index 000000000..897f4b3db
--- /dev/null
+++ b/res/values-cs/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <bool name="im_is_default">true</bool>
+</resources>
diff --git a/res/values-de/bools.xml b/res/values-de/bools.xml
new file mode 100644
index 000000000..897f4b3db
--- /dev/null
+++ b/res/values-de/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <bool name="im_is_default">true</bool>
+</resources>
diff --git a/res/values-es/bools.xml b/res/values-es/bools.xml
new file mode 100644
index 000000000..897f4b3db
--- /dev/null
+++ b/res/values-es/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <bool name="im_is_default">true</bool>
+</resources>
diff --git a/res/values-fr/bools.xml b/res/values-fr/bools.xml
new file mode 100644
index 000000000..897f4b3db
--- /dev/null
+++ b/res/values-fr/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <bool name="im_is_default">true</bool>
+</resources>
diff --git a/res/values-it/bools.xml b/res/values-it/bools.xml
new file mode 100644
index 000000000..897f4b3db
--- /dev/null
+++ b/res/values-it/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <bool name="im_is_default">true</bool>
+</resources>
diff --git a/res/values-nl/bools.xml b/res/values-nl/bools.xml
new file mode 100644
index 000000000..897f4b3db
--- /dev/null
+++ b/res/values-nl/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <bool name="im_is_default">true</bool>
+</resources>
diff --git a/res/values-pl/bools.xml b/res/values-pl/bools.xml
new file mode 100644
index 000000000..897f4b3db
--- /dev/null
+++ b/res/values-pl/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <bool name="im_is_default">true</bool>
+</resources>
diff --git a/res/values/bools.xml b/res/values/bools.xml
new file mode 100644
index 000000000..06aa8f308
--- /dev/null
+++ b/res/values/bools.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <!-- Whether or not auto-correction should be enabled by default -->
+ <bool name="enable_autocorrect">false</bool>
+ <!-- Whether this input method should be used as the default for a locale. Override it
+ for latin languages. -->
+ <bool name="im_is_default">false</bool>
+</resources>
diff --git a/res/xml/prefs.xml b/res/xml/prefs.xml
index 865269907..2fc82aadb 100644
--- a/res/xml/prefs.xml
+++ b/res/xml/prefs.xml
@@ -62,7 +62,7 @@
android:title="@string/auto_complete"
android:summary="@string/auto_complete_summary"
android:persistent="true"
- android:defaultValue="true"
+ android:defaultValue="@bool/enable_autocorrect"
android:dependency="show_suggestions"
/>
diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java
index a36ff5747..f81637580 100644
--- a/src/com/android/inputmethod/latin/LatinIME.java
+++ b/src/com/android/inputmethod/latin/LatinIME.java
@@ -1005,7 +1005,8 @@ public class LatinIME extends InputMethodService
// will continue to work
if (AutoText.getSize(mInputView) < 1) mQuickFixes = true;
mShowSuggestions = sp.getBoolean(PREF_SHOW_SUGGESTIONS, true) & mQuickFixes;
- mAutoComplete = sp.getBoolean(PREF_AUTO_COMPLETE, true) & mShowSuggestions;
+ mAutoComplete = sp.getBoolean(PREF_AUTO_COMPLETE,
+ getResources().getBoolean(R.bool.enable_autocorrect)) & mShowSuggestions;
mAutoCorrectOn = mSuggest != null && (mAutoComplete || mQuickFixes);
mCorrectionMode = mAutoComplete ? 2 : (mQuickFixes ? 1 : 0);
}