Make LocalePicker Fragment.
The logic calling selectFirst() is removed as
- There's no comment why it is needed.
- Actually SetupWizard gets stack as that forces users to see
WirelessSettings in SetupWizard.
The other changes:
- Move back LocalePickerFragment to LocalePicker.
- Make <activity> for LocalePicker in AndroidManifest <activity-alias>
- Add a short comment about how getComponent(), which should be a key
for understanding how top-level settings work.
- Modify LanguageSettings so that it corectly points LocalePicker as
a fragment.
Change-Id: I78d356e40af896ba1aab72fba12c90467371c7b0
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 9195d77..460ca96 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -87,6 +87,11 @@
if (initialFragment != null) {
showFragment(initialFragment, initialArguments);
} else {
+ // Intent#getCompontent() lets us get Fragment name, even when the Intent is
+ // given via <activity-alias>.
+ //
+ // e.g. When we reach here via "ChildSetting" activity-alias,
+ // we should get the name here instead of targetActivity ("Settings").
if (intent.getComponent().getClassName().equals(this.getClass().getName())) {
showFragment(TopLevelSettings.class.getName(), null);
} else {