can open settings with support tab by default
Changes were made to the two files to allow users to provide
an argument in the intent for the settings activity. This
argument allows you to specify if you want the summary tab
or support open on startup.
Fixes: 30233920
Change-Id: I4745a0f75ea6a60a22381f5e58f2fac3836d86b9
(cherry picked from commit 2368e548e6
)
This commit is contained in:
@@ -588,7 +588,6 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
// of starting fresh.
|
||||
mSearchMenuItemExpanded = savedState.getBoolean(SAVE_KEY_SEARCH_MENU_EXPANDED);
|
||||
mSearchQuery = savedState.getString(SAVE_KEY_SEARCH_QUERY);
|
||||
|
||||
setTitleFromIntent(intent);
|
||||
|
||||
ArrayList<DashboardCategory> categories =
|
||||
@@ -601,6 +600,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
|
||||
mDisplayHomeAsUpEnabled = savedState.getBoolean(SAVE_KEY_SHOW_HOME_AS_UP);
|
||||
mDisplaySearch = savedState.getBoolean(SAVE_KEY_SHOW_SEARCH);
|
||||
|
||||
} else {
|
||||
if (!mIsShowingDashboard) {
|
||||
mDisplaySearch = false;
|
||||
@@ -623,7 +623,13 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
// Show Search affordance
|
||||
mDisplaySearch = true;
|
||||
mInitialTitleResId = R.string.dashboard_title;
|
||||
switchToFragment(DashboardContainerFragment.class.getName(), null, false, false,
|
||||
|
||||
// add argument to indicate which settings tab should be initially selected
|
||||
final Bundle args = new Bundle();
|
||||
final String extraName = DashboardContainerFragment.EXTRA_SELECT_SETTINGS_TAB;
|
||||
args.putString(extraName, intent.getStringExtra(extraName));
|
||||
|
||||
switchToFragment(DashboardContainerFragment.class.getName(), args, false, false,
|
||||
mInitialTitleResId, mInitialTitle, false);
|
||||
}
|
||||
}
|
||||
@@ -1272,5 +1278,4 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user