Remove "Use only personalization dictionary".

Bug: 13216198
Change-Id: I20ce61c4a10c360e028bf6427f632cc5299763e4
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index ddff769..5efa733 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -491,8 +491,6 @@
     <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] -->
diff --git a/java/res/xml/prefs_for_debug.xml b/java/res/xml/prefs_for_debug.xml
index 81a5d98..7b2b8ea 100644
--- a/java/res/xml/prefs_for_debug.xml
+++ b/java/res/xml/prefs_for_debug.xml
@@ -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" />
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java
index 26d5dda..14e1baf 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java
@@ -53,7 +53,6 @@
 
     private final ConcurrentHashMap<String, Dictionary> mDictionaries =
             CollectionUtils.newConcurrentHashMap();
-    private HashSet<String> mDictionarySubsetForDebug = null;
 
     private Dictionary mMainDictionary;
     private ContactsBinaryDictionary mContactsDictionary;
@@ -83,7 +82,6 @@
         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 @@
             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 @@
         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 @@
         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 @@
     }
 
     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);
diff --git a/java/src/com/android/inputmethod/latin/settings/DebugSettings.java b/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
index c87dd15..11d3692 100644
--- a/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
+++ b/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
@@ -42,8 +42,6 @@
     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 =
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
index 77968f7..50fbbb1 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
@@ -84,7 +84,6 @@
     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 @@
                 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 @@
         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 = ");