summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaisuke Miyakawa <dmiyakawa@google.com>2010-09-12 13:52:09 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-12 13:52:09 -0700
commit2712fb5d7992c78425a4845ffb23853de30f3a2a (patch)
tree29b7e63aaff8b3f6f2966ff5ecb56e821d624e52
parentb61cf51d850d37a4d82b93b8ee0d190930421a46 (diff)
parentc88c6bbcd0d3901fe9f61bab82a17ec49ad62e6d (diff)
downloadpackages_apps_settings-2712fb5d7992c78425a4845ffb23853de30f3a2a.zip
packages_apps_settings-2712fb5d7992c78425a4845ffb23853de30f3a2a.tar.gz
packages_apps_settings-2712fb5d7992c78425a4845ffb23853de30f3a2a.tar.bz2
Merge "Simplify the logic for LanguageSettings."
-rw-r--r--src/com/android/settings/LanguageSettings.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/com/android/settings/LanguageSettings.java b/src/com/android/settings/LanguageSettings.java
index 2e5588d..cee9391 100644
--- a/src/com/android/settings/LanguageSettings.java
+++ b/src/com/android/settings/LanguageSettings.java
@@ -236,15 +236,6 @@ public class LanguageSettings extends SettingsPreferenceFragment {
if (Utils.isMonkeyRunning()) {
return false;
}
- final String fragmentClass = preference.getFragment();
- if (fragmentClass != null) {
- final Activity activity = getActivity();
- if (activity instanceof com.android.settings.Settings) {
- return ((com.android.settings.Settings) activity).showFragment(preference);
- } else {
- Log.w(TAG, "Fragment is available while the parent is not Settings Activity.");
- }
- }
if (preference instanceof CheckBoxPreference) {
final CheckBoxPreference chkPref = (CheckBoxPreference) preference;
@@ -301,7 +292,9 @@ public class LanguageSettings extends SettingsPreferenceFragment {
mLastTickedInputMethodId = null;
}
} else if (preference instanceof PreferenceScreen) {
- if (KEY_INPUT_METHOD.equals(preference.getKey())) {
+ if (preference.getFragment() != null) {
+ // Fragment will be handled correctly by the super class.
+ } else if (KEY_INPUT_METHOD.equals(preference.getKey())) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();
} else if (preference.getIntent() == null) {