Remove "Use only personalization dictionary".

Bug: 13216198
Change-Id: I20ce61c4a10c360e028bf6427f632cc5299763e4
main
Keisuke Kuroyanagi 2014-02-27 16:49:25 +09:00
parent e9926b0d11
commit 1aac28a2b9
5 changed files with 1 additions and 33 deletions

View File

@ -491,8 +491,6 @@ mobile devices. [CHAR LIMIT=25] -->
<string name="prefs_key_popup_dismiss_end_scale_settings" translatable="false">Key popup dismiss end scale</string>
<!-- Title of the settings for reading an external dictionary file -->
<string name="prefs_read_external_dictionary">Read external dictionary file</string>
<!-- Title of the settings for using only personalization dictionary -->
<string name="prefs_use_only_personalization_dictionary" translatable="false">Use only personalization dictionary</string>
<!-- Message to show when there are no files to install as an external dictionary [CHAR LIMIT=100] -->
<string name="read_external_dictionary_no_files_message">No dictionary files in the Downloads folder</string>
<!-- Title of the dialog that selects a file to install as an external dictionary [CHAR LIMIT=50] -->

View File

@ -65,11 +65,6 @@
android:key="pref_key_preview_dismiss_duration"
android:title="@string/prefs_key_popup_dismiss_duration_settings"
latin:maxValue="100" /> <!-- milliseconds -->
<CheckBoxPreference
android:defaultValue="false"
android:key="use_only_personalization_dictionary_for_debug"
android:persistent="true"
android:title="@string/prefs_use_only_personalization_dictionary" />
<PreferenceScreen
android:key="read_external_dictionary"
android:title="@string/prefs_read_external_dictionary" />

View File

@ -53,7 +53,6 @@ public class DictionaryFacilitatorForSuggest {
private final ConcurrentHashMap<String, Dictionary> mDictionaries =
CollectionUtils.newConcurrentHashMap();
private HashSet<String> mDictionarySubsetForDebug = null;
private Dictionary mMainDictionary;
private ContactsBinaryDictionary mContactsDictionary;
@ -83,7 +82,6 @@ public class DictionaryFacilitatorForSuggest {
mContext = context;
mLocale = locale;
mLatchForWaitingLoadingMainDictionary = new CountDownLatch(1);
initForDebug(settingsValues);
loadMainDict(context, locale, listener);
setUserDictionary(new UserBinaryDictionary(context, locale));
resetAdditionalDictionaries(oldDictionaryFacilitator, settingsValues);
@ -99,7 +97,6 @@ public class DictionaryFacilitatorForSuggest {
final DictionaryFacilitatorForSuggest oldDictionaryFacilitator) {
mContext = oldDictionaryFacilitator.mContext;
mLocale = oldDictionaryFacilitator.mLocale;
mDictionarySubsetForDebug = oldDictionaryFacilitator.mDictionarySubsetForDebug;
mLatchForWaitingLoadingMainDictionary = new CountDownLatch(1);
loadMainDict(mContext, mLocale, listener);
// Transfer user dictionary.
@ -128,7 +125,6 @@ public class DictionaryFacilitatorForSuggest {
mContext = oldDictionaryFacilitator.mContext;
mLocale = oldDictionaryFacilitator.mLocale;
mLatchForWaitingLoadingMainDictionary = new CountDownLatch(0);
initForDebug(settingsValues);
// Transfer main dictionary.
setMainDictionary(oldDictionaryFacilitator.mMainDictionary);
oldDictionaryFacilitator.removeDictionary(Dictionary.TYPE_MAIN);
@ -191,17 +187,7 @@ public class DictionaryFacilitatorForSuggest {
return !mLocale.equals(newLocale)
|| (newSettingsValues.mUseContactsDict != (mContactsDictionary != null))
|| (newSettingsValues.mUsePersonalizedDicts != (mUserHistoryDictionary != null))
|| (newSettingsValues.mUsePersonalizedDicts != hasPersonalizationDictionary())
|| (newSettingsValues.mUseOnlyPersonalizationDictionaryForDebug
!= (mDictionarySubsetForDebug != null));
}
// initialize a debug flag for the personalization
private void initForDebug(final SettingsValues settingsValues) {
if (settingsValues.mUseOnlyPersonalizationDictionaryForDebug) {
mDictionarySubsetForDebug = new HashSet<String>();
mDictionarySubsetForDebug.add(Dictionary.TYPE_PERSONALIZATION);
}
|| (newSettingsValues.mUsePersonalizedDicts != hasPersonalizationDictionary());
}
public void close() {
@ -531,10 +517,6 @@ public class DictionaryFacilitatorForSuggest {
}
private void addOrReplaceDictionary(final String key, final Dictionary dict) {
if (mDictionarySubsetForDebug != null && !mDictionarySubsetForDebug.contains(key)) {
Log.w(TAG, "Ignore add " + key + " dictionary for debug.");
return;
}
final Dictionary oldDict;
if (dict == null) {
oldDict = mDictionaries.remove(key);

View File

@ -42,8 +42,6 @@ public final class DebugSettings extends PreferenceFragment
public static final String PREF_FORCE_NON_DISTINCT_MULTITOUCH = "force_non_distinct_multitouch";
public static final String PREF_USABILITY_STUDY_MODE = "usability_study_mode";
public static final String PREF_STATISTICS_LOGGING = "enable_logging";
public static final String PREF_USE_ONLY_PERSONALIZATION_DICTIONARY_FOR_DEBUG =
"use_only_personalization_dictionary_for_debug";
public static final String PREF_KEY_PREVIEW_SHOW_UP_START_SCALE =
"pref_key_preview_show_up_start_scale";
public static final String PREF_KEY_PREVIEW_DISMISS_END_SCALE =

View File

@ -84,7 +84,6 @@ public final class SettingsValues {
public final float mAutoCorrectionThreshold;
public final boolean mCorrectionEnabled;
public final int mSuggestionVisibility;
public final boolean mUseOnlyPersonalizationDictionaryForDebug;
public final int mDisplayOrientation;
private final AsyncResultHolder<AppWorkaroundsUtils> mAppWorkarounds;
@ -168,8 +167,6 @@ public final class SettingsValues {
prefs, DebugSettings.PREF_KEY_PREVIEW_DISMISS_END_SCALE,
ResourceUtils.getFloatFromFraction(
res, R.fraction.config_key_preview_dismiss_end_scale));
mUseOnlyPersonalizationDictionaryForDebug = prefs.getBoolean(
DebugSettings.PREF_USE_ONLY_PERSONALIZATION_DICTIONARY_FOR_DEBUG, false);
mDisplayOrientation = res.getConfiguration().orientation;
mAppWorkarounds = new AsyncResultHolder<AppWorkaroundsUtils>();
final PackageInfo packageInfo = TargetPackageInfoGetterTask.getCachedPackageInfo(
@ -390,8 +387,6 @@ public final class SettingsValues {
sb.append("" + mCorrectionEnabled);
sb.append("\n mSuggestionVisibility = ");
sb.append("" + mSuggestionVisibility);
sb.append("\n mUseOnlyPersonalizationDictionaryForDebug = ");
sb.append("" + mUseOnlyPersonalizationDictionaryForDebug);
sb.append("\n mDisplayOrientation = ");
sb.append("" + mDisplayOrientation);
sb.append("\n mAppWorkarounds = ");