Fix the title of the fragments of the personal dictionary settings
Bug: 8600958
Change-Id: I9b8bab21b144385bc2386e7fcb67e1c197f84113
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 59b562d..1a6aea3 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -511,7 +511,7 @@
</receiver>
<activity android:name="Settings$UserDictionarySettingsActivity"
- android:label="@string/user_dict_settings_titlebar"
+ android:label="@string/user_dict_settings_title"
android:taskAffinity="com.android.settings"
android:parentActivityName="Settings$InputMethodAndLanguageSettingsActivity">
<intent-filter>
@@ -531,7 +531,7 @@
</activity>
<activity android:name=".inputmethod.UserDictionaryAddWordActivity"
- android:label="@string/user_dict_settings_titlebar"
+ android:label="@string/user_dict_settings_title"
android:theme="@android:style/Theme.Holo.Dialog.NoActionBar"
android:windowSoftInputMode="stateVisible"
android:noHistory="true"
@@ -546,7 +546,7 @@
<!-- Keep compatibility with old shortcuts. -->
<activity-alias android:name="UserDictionarySettings"
- android:label="@string/user_dict_settings_titlebar"
+ android:label="@string/user_dict_settings_title"
android:exported="true"
android:targetActivity="Settings$UserDictionarySettingsActivity">
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3885f0b..23dcf5b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2929,13 +2929,9 @@
<string name="keyboard_layout_picker_title">Keyboard layouts</string>
<!-- User dictionary settings --><skip />
- <!-- User dictionary settings, The titlebar text of the User dictionary settings screen. -->
- <string name="user_dict_settings_titlebar">User dictionary</string>
- <!-- User dictionary settings, The title of the list item to go into the User dictionary settings screen when there is only one user dictionary. [CHAR LIMIT=35] -->
- <string name="user_dict_single_settings_title">Personal dictionary</string>
- <!-- User dictionary settings, The title of the list item to go into the User dictionary list when there are several user dictionaries. [CHAR LIMIT=35] -->
- <string name="user_dict_multiple_settings_title">Personal dictionaries</string>
- <!-- User dictionary settings. The summary of the listem item to go into the User dictionary settings screen. -->
+ <!-- User dictionary settings. The title of the list item to go into the Personal dictionary settings screen. [CHAR LIMIT=35] -->
+ <string name="user_dict_settings_title">Personal dictionary</string>
+ <!-- User dictionary settings. The summary of the list item to go into the Personal dictionary settings screen. -->
<string name="user_dict_settings_summary">""</string>
<!-- User dictionary settings. The title of the menu item to add a new word to the user dictionary. -->
<string name="user_dict_settings_add_menu_title">Add</string>
diff --git a/res/xml/language_settings.xml b/res/xml/language_settings.xml
index f001486..3e7fdb5 100644
--- a/res/xml/language_settings.xml
+++ b/res/xml/language_settings.xml
@@ -29,7 +29,8 @@
<!-- User dictionary preference title and fragment will be set programmatically. -->
<PreferenceScreen
- android:key="key_user_dictionary_settings" />
+ android:key="key_user_dictionary_settings"
+ android:title="@string/user_dict_settings_title" />
<PreferenceCategory android:key="keyboard_settings_category"
android:title="@string/keyboard_settings_category">
diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
index 2a5adb1..acb0c22 100644
--- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
+++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
@@ -199,10 +199,6 @@
// not present or disabled. In this case we need to remove the preference.
getPreferenceScreen().removePreference(userDictionaryPreference);
} else if (localeList.size() <= 1) {
- final Intent intent =
- new Intent(UserDictionaryList.USER_DICTIONARY_SETTINGS_INTENT_ACTION);
- userDictionaryPreference.setTitle(R.string.user_dict_single_settings_title);
- userDictionaryPreference.setIntent(intent);
userDictionaryPreference.setFragment(
com.android.settings.UserDictionarySettings.class.getName());
// If the size of localeList is 0, we don't set the locale parameter in the
@@ -216,7 +212,6 @@
userDictionaryPreference.getExtras().putString("locale", locale);
}
} else {
- userDictionaryPreference.setTitle(R.string.user_dict_multiple_settings_title);
userDictionaryPreference.setFragment(UserDictionaryList.class.getName());
}
}