summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/language/UserDictionaryPreferenceController.java
diff options
context:
space:
mode:
authorEmily Chuang <emilychuang@android.com>2018-04-03 21:00:49 +0800
committerFan Zhang <zhfan@google.com>2018-04-17 12:27:24 -0700
commit5e3718d35446be2ee0ee4b9f78565fe0e1f3f87d (patch)
treeac3a3950ff87f322818c3d05054b1fa444a497de /src/com/android/settings/language/UserDictionaryPreferenceController.java
parent0d59a62bfb9330b4ba86925cf916b9e826cb8835 (diff)
downloadpackages_apps_Settings-5e3718d35446be2ee0ee4b9f78565fe0e1f3f87d.tar.gz
packages_apps_Settings-5e3718d35446be2ee0ee4b9f78565fe0e1f3f87d.tar.bz2
packages_apps_Settings-5e3718d35446be2ee0ee4b9f78565fe0e1f3f87d.zip
Migrate UserDictionaryList to DashboardFragment
- Build a controller to generate/manage a list of preferences. - Move some logics to the controller and add tests. Test: manual Test: make RunSettingsRoboTests -j atest UniquePreferenceTest SettingsGatewayTest Change-Id: Ia3d885cb8917c7d5498b87818e24b938f0d95dbb
Diffstat (limited to 'src/com/android/settings/language/UserDictionaryPreferenceController.java')
-rw-r--r--src/com/android/settings/language/UserDictionaryPreferenceController.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/settings/language/UserDictionaryPreferenceController.java b/src/com/android/settings/language/UserDictionaryPreferenceController.java
index 3a1d6e0ff4..fa6dce6c92 100644
--- a/src/com/android/settings/language/UserDictionaryPreferenceController.java
+++ b/src/com/android/settings/language/UserDictionaryPreferenceController.java
@@ -23,6 +23,7 @@ import android.support.v7.preference.Preference;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settings.inputmethod.UserDictionaryList;
+import com.android.settings.inputmethod.UserDictionaryListPreferenceController;
import com.android.settings.inputmethod.UserDictionarySettings;
import com.android.settingslib.core.AbstractPreferenceController;
@@ -61,10 +62,10 @@ public class UserDictionaryPreferenceController extends AbstractPreferenceContro
// 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()
+ // UserDictionaryListPreferenceController#getUserDictionaryLocalesSet()
// the locale list always has at least one element, since it
// always includes the current locale explicitly.
- // @see UserDictionaryList.getUserDictionaryLocalesSet().
+ // @see UserDictionaryListPreferenceController.getUserDictionaryLocalesSet().
extras.putString("locale", localeSet.first());
}
targetFragment = UserDictionarySettings.class;
@@ -75,6 +76,6 @@ public class UserDictionaryPreferenceController extends AbstractPreferenceContro
}
protected TreeSet<String> getDictionaryLocales() {
- return UserDictionaryList.getUserDictionaryLocalesSet(mContext);
+ return UserDictionaryListPreferenceController.getUserDictionaryLocalesSet(mContext);
}
}