summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SettingsActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/SettingsActivity.java')
-rw-r--r--src/com/android/settings/SettingsActivity.java28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index e0ab5bc..c566f6c 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -184,8 +184,13 @@ public class SettingsActivity extends Activity
* that fragment.
*/
public static final String EXTRA_SHOW_FRAGMENT_TITLE = ":settings:show_fragment_title";
- public static final String EXTRA_SHOW_FRAGMENT_TITLE_RESID = ":settings:show_fragment_title_resid";
- public static final String EXTRA_SHOW_FRAGMENT_AS_SHORTCUT = ":settings:show_fragment_as_shortcut";
+ public static final String EXTRA_SHOW_FRAGMENT_TITLE_RESID =
+ ":settings:show_fragment_title_resid";
+ public static final String EXTRA_SHOW_FRAGMENT_AS_SHORTCUT =
+ ":settings:show_fragment_as_shortcut";
+
+ public static final String EXTRA_SHOW_FRAGMENT_AS_SUBSETTING =
+ ":settings:show_fragment_as_subsetting";
private static final String META_DATA_KEY_FRAGMENT_CLASS =
"com.android.settings.FRAGMENT_CLASS";
@@ -291,7 +296,8 @@ public class SettingsActivity extends Activity
NotificationAppList.class.getName(),
AppNotificationSettings.class.getName(),
OtherSoundSettings.class.getName(),
- QuickLaunchSettings.class.getName()
+ QuickLaunchSettings.class.getName(),
+ ApnSettings.class.getName()
};
@@ -496,12 +502,15 @@ public class SettingsActivity extends Activity
final String className = cn.getClassName();
mIsShowingDashboard = className.equals(Settings.class.getName());
- final boolean isSubSettings = className.equals(SubSettings.class.getName());
- // If this is a sub settings or not the main Dashboard and not a Shortcut and an initial
- // Fragment then apply the SubSettings theme for the ActionBar content insets
- if (isSubSettings ||
- (!mIsShowingDashboard && !mIsShortcut && (initialFragmentName != null))) {
+ // This is a "Sub Settings" when:
+ // - this is a real SubSettings
+ // - or :settings:show_fragment_as_subsetting is passed to the Intent
+ final boolean isSubSettings = className.equals(SubSettings.class.getName()) ||
+ intent.getBooleanExtra(EXTRA_SHOW_FRAGMENT_AS_SUBSETTING, false);
+
+ // If this is a sub settings, then apply the SubSettings Theme for the ActionBar content insets
+ if (isSubSettings) {
// Check also that we are not a Theme Dialog as we don't want to override them
final int themeResId = getThemeResId();
if (themeResId != R.style.Theme_DialogWhenLarge &&
@@ -551,6 +560,9 @@ public class SettingsActivity extends Activity
} else if (isSubSettings) {
mDisplayHomeAsUpEnabled = true;
mDisplaySearch = true;
+ } else {
+ mDisplayHomeAsUpEnabled = false;
+ mDisplaySearch = false;
}
setTitleFromIntent(intent);