diff options
author | 2015-03-30 17:27:56 -0700 | |
---|---|---|
committer | 2015-03-30 17:27:56 -0700 | |
commit | 76de0a8f528830d7f6c85f45f63cac0f5aa8517c (patch) | |
tree | 240a14eceedd86eb5e1f53021edb1d45e300b027 /java | |
parent | fa22abb94dc54650663c2b86313681621135e587 (diff) | |
download | latinime-76de0a8f528830d7f6c85f45f63cac0f5aa8517c.tar.gz latinime-76de0a8f528830d7f6c85f45f63cac0f5aa8517c.tar.xz latinime-76de0a8f528830d7f6c85f45f63cac0f5aa8517c.zip |
Remove "Personal dictionary" link from settings.
Bug 19966848.
Change-Id: Ice6a030d2d2319822d5108c5b6a37efa4de1090f
Diffstat (limited to 'java')
4 files changed, 0 insertions, 52 deletions
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index d64872cdd..79ecc8d58 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -129,9 +129,6 @@ <!-- Description for option to enable auto capitalization of sentences --> <string name="auto_cap_summary">Capitalize the first word of each sentence</string> - <!-- Option to edit personal dictionary. [CHAR_LIMIT=30]--> - <string name="edit_personal_dictionary">Personal dictionary</string> - <!-- Option to configure dictionaries --> <string name="configure_dictionaries_title">Add-on dictionaries</string> <!-- Name of the main dictionary, as opposed to auxiliary dictionaries (medical/entertainment/sports...) --> diff --git a/java/res/xml/prefs_screen_correction.xml b/java/res/xml/prefs_screen_correction.xml index a943dc1a3..d3f5c2695 100644 --- a/java/res/xml/prefs_screen_correction.xml +++ b/java/res/xml/prefs_screen_correction.xml @@ -20,11 +20,6 @@ android:title="@string/settings_screen_correction" android:key="screen_correction"> <PreferenceScreen - android:key="edit_personal_dictionary" - android:title="@string/edit_personal_dictionary"> - <intent android:action="android.settings.USER_DICTIONARY_SETTINGS" /> - </PreferenceScreen> - <PreferenceScreen android:key="configure_dictionaries_key" android:title="@string/configure_dictionaries_title"> <intent diff --git a/java/src/com/android/inputmethod/latin/settings/CorrectionSettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/CorrectionSettingsFragment.java index 62834cd2a..aa73a9a83 100644 --- a/java/src/com/android/inputmethod/latin/settings/CorrectionSettingsFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/CorrectionSettingsFragment.java @@ -16,29 +16,20 @@ package com.android.inputmethod.latin.settings; -import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; import android.os.Build; import android.os.Bundle; import android.preference.Preference; -import android.preference.TwoStatePreference; import com.android.inputmethod.dictionarypack.DictionarySettingsActivity; import com.android.inputmethod.latin.R; -import com.android.inputmethod.latin.userdictionary.UserDictionaryList; -import com.android.inputmethod.latin.userdictionary.UserDictionarySettings; - -import java.util.TreeSet; /** * "Text correction" settings sub screen. * * This settings sub screen handles the following text correction preferences. - * - Personal dictionary * - Add-on dictionaries * - Block offensive words * - Auto-correction @@ -68,39 +59,5 @@ public final class CorrectionSettingsFragment extends SubScreenFragment { if (0 >= number) { removePreference(Settings.PREF_CONFIGURE_DICTIONARIES_KEY); } - - final Preference editPersonalDictionary = - findPreference(Settings.PREF_EDIT_PERSONAL_DICTIONARY); - final Intent editPersonalDictionaryIntent = editPersonalDictionary.getIntent(); - final ResolveInfo ri = USE_INTERNAL_PERSONAL_DICTIONARY_SETTINGS ? null - : pm.resolveActivity( - editPersonalDictionaryIntent, PackageManager.MATCH_DEFAULT_ONLY); - if (ri == null) { - overwriteUserDictionaryPreference(editPersonalDictionary); - } - } - - private void overwriteUserDictionaryPreference(final Preference userDictionaryPreference) { - final Activity activity = getActivity(); - final TreeSet<String> localeList = UserDictionaryList.getUserDictionaryLocalesSet(activity); - if (null == localeList) { - // The locale list is null if and only if the user dictionary service is - // not present or disabled. In this case we need to remove the preference. - getPreferenceScreen().removePreference(userDictionaryPreference); - } else if (localeList.size() <= 1) { - userDictionaryPreference.setFragment(UserDictionarySettings.class.getName()); - // If the size of localeList is 0, we don't set the locale parameter in the - // extras. This will be interpreted by the UserDictionarySettings class as - // meaning "the current locale". - // Note that with the current code for UserDictionaryList#getUserDictionaryLocalesSet() - // the locale list always has at least one element, since it always includes the current - // locale explicitly. @see UserDictionaryList.getUserDictionaryLocalesSet(). - if (localeList.size() == 1) { - final String locale = (String)localeList.toArray()[0]; - userDictionaryPreference.getExtras().putString("locale", locale); - } - } else { - userDictionaryPreference.setFragment(UserDictionaryList.class.getName()); - } } } diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java index 715f7bb38..e9645eef1 100644 --- a/java/src/com/android/inputmethod/latin/settings/Settings.java +++ b/java/src/com/android/inputmethod/latin/settings/Settings.java @@ -55,7 +55,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang // PREF_VOICE_MODE_OBSOLETE is obsolete. Use PREF_VOICE_INPUT_KEY instead. public static final String PREF_VOICE_MODE_OBSOLETE = "voice_mode"; public static final String PREF_VOICE_INPUT_KEY = "pref_voice_input_key"; - public static final String PREF_EDIT_PERSONAL_DICTIONARY = "edit_personal_dictionary"; public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key"; // PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE is obsolete. Use PREF_AUTO_CORRECTION instead. public static final String PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE = |