Roaming and background controls under data usage.

Add action items to control mobile data roaming and background data
controls, along with dialogs to confirm.  Still need to fix telephony
to watch for Settings.Secure changes.

Hide "Change cycle" item when viewing app details.  Handle special
case where data usage doesn't want split action bar.

Bug: 4818009, 4979025, 4948767, 5010948
Change-Id: I363ff76a9daf2528d81573cf8d0687719d664bb0
This commit is contained in:
Jeff Sharkey
2011-07-09 17:52:31 -07:00
parent 9f81ee87ef
commit 9fab0da184
5 changed files with 206 additions and 25 deletions

View File

@@ -59,6 +59,8 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
private static final String META_DATA_KEY_PARENT_FRAGMENT_CLASS =
"com.android.settings.PARENT_FRAGMENT_CLASS";
private static final String EXTRA_THEME = "settings:theme";
private static final String SAVE_KEY_CURRENT_HEADER = "com.android.settings.CURRENT_HEADER";
private static final String SAVE_KEY_PARENT_HEADER = "com.android.settings.PARENT_HEADER";
@@ -76,6 +78,10 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
@Override
protected void onCreate(Bundle savedInstanceState) {
final int theme = getIntent().getIntExtra(
EXTRA_THEME, android.R.style.Theme_Holo_SolidActionBar_SplitActionBarWhenNarrow);
setTheme(theme);
getMetaData();
mInLocalHeaderSwitch = true;
super.onCreate(savedInstanceState);
@@ -277,6 +283,12 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
int titleRes, int shortTitleRes) {
Intent intent = super.onBuildStartFragmentIntent(fragmentName, args,
titleRes, shortTitleRes);
// some fragments would like a custom activity theme
if (DataUsageSummary.class.getName().equals(fragmentName)) {
intent.putExtra(EXTRA_THEME, android.R.style.Theme_Holo_SolidActionBar);
}
intent.setClass(this, SubSettings.class);
return intent;
}