diff options
author | 2014-07-22 10:18:38 -0700 | |
---|---|---|
committer | 2014-07-27 14:47:07 +0900 | |
commit | ab661e3ef886a36b02fe094864ae4be6a3260f71 (patch) | |
tree | 7a2c8175549d184938d4769c73685673e2d2ad5b /tests/src/com/android/inputmethod/latin/InputLogicTests.java | |
parent | 825243bfdd6fb63c2ef8bf99024bb06e6f52e946 (diff) | |
download | latinime-ab661e3ef886a36b02fe094864ae4be6a3260f71.tar.gz latinime-ab661e3ef886a36b02fe094864ae4be6a3260f71.tar.xz latinime-ab661e3ef886a36b02fe094864ae4be6a3260f71.zip |
Make "Show correction suggestions" as a binary option
Formerly "Show correction suggestions" had three options, "always
show", "show in portrait mode", and "always hide". The reason behind
"show in portrait mode" was that there may not be enough screen estate
in landscape mode to show suggestions. Because recent phone devices
have relatively large screen, we decide to remove "show in portrait
mode" option.
Bug: 15780939
Change-Id: I896d737452c3893d43ce20bd88127f10c1eb3d83
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputLogicTests.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java index de9475af4..59b858dbd 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java @@ -16,12 +16,12 @@ package com.android.inputmethod.latin; -import com.android.inputmethod.latin.settings.Settings; - import android.test.suitebuilder.annotation.LargeTest; import android.text.TextUtils; import android.view.inputmethod.BaseInputConnection; +import com.android.inputmethod.latin.settings.Settings; + @LargeTest public class InputLogicTests extends InputTestsBase { @@ -242,16 +242,14 @@ public class InputLogicTests extends InputTestsBase { public void testDoubleSpacePeriod() { // Reset settings to default, else these tests will go flaky. - setStringPreference(Settings.PREF_SHOW_SUGGESTIONS_SETTING, "0", "0"); + setBooleanPreference(Settings.PREF_SHOW_SUGGESTIONS, true, true); setStringPreference(Settings.PREF_AUTO_CORRECTION_THRESHOLD, "1", "1"); setBooleanPreference(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true, true); testDoubleSpacePeriodWithSettings(true /* expectsPeriod */); - // "Suggestion visibility" to "always hide" - testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "2"); - // "Suggestion visibility" to "portrait only" - testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "1"); - // "Suggestion visibility" to "always show" - testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "0"); + // "Suggestion visibility" to off + testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS, false); + // "Suggestion visibility" to on + testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS, true); // "Double-space period" to "off" testDoubleSpacePeriodWithSettings(false, Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, false); @@ -264,10 +262,10 @@ public class InputLogicTests extends InputTestsBase { testDoubleSpacePeriodWithSettings(true, Settings.PREF_AUTO_CORRECTION_THRESHOLD, "3"); // "Suggestion visibility" to "always hide" and "Auto-correction" to "off" - testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "0", + testDoubleSpacePeriodWithSettings(true, Settings.PREF_SHOW_SUGGESTIONS, false, Settings.PREF_AUTO_CORRECTION_THRESHOLD, "0"); // "Suggestion visibility" to "always hide" and "Auto-correction" to "off" - testDoubleSpacePeriodWithSettings(false, Settings.PREF_SHOW_SUGGESTIONS_SETTING, "0", + testDoubleSpacePeriodWithSettings(false, Settings.PREF_SHOW_SUGGESTIONS, false, Settings.PREF_AUTO_CORRECTION_THRESHOLD, "0", Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, false); } |