Display setting and support in a tab layout - DO NOT MERGE
Bug: 28269035
Bug: 28139604
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 176ab7e..cde3a2d 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -49,6 +49,7 @@
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.SearchView;
+
import com.android.internal.util.ArrayUtils;
import com.android.settings.Settings.WifiSettingsActivity;
import com.android.settings.accessibility.AccessibilitySettings;
@@ -68,7 +69,7 @@
import com.android.settings.applications.WriteSettingsDetails;
import com.android.settings.applications.VrListenerSettings;
import com.android.settings.bluetooth.BluetoothSettings;
-import com.android.settings.dashboard.DashboardSummary;
+import com.android.settings.dashboard.DashboardContainerFragment;
import com.android.settings.dashboard.SearchResultsSummary;
import com.android.settings.datausage.DataUsageSummary;
import com.android.settings.deviceinfo.PrivateVolumeForget;
@@ -613,7 +614,7 @@
// Show Search affordance
mDisplaySearch = true;
mInitialTitleResId = R.string.dashboard_title;
- switchToFragment(DashboardSummary.class.getName(), null, false, false,
+ switchToFragment(DashboardContainerFragment.class.getName(), null, false, false,
mInitialTitleResId, mInitialTitle, false);
}
}
@@ -687,7 +688,7 @@
}
/**
- * Sets the id of the view continaing the main content. Should be called before calling super's
+ * Sets the id of the view containing the main content. Should be called before calling super's
* onCreate.
*/
protected void setMainContentId(int contentId) {
@@ -729,7 +730,7 @@
setTitleFromBackStack();
}
- private int setTitleFromBackStack() {
+ private void setTitleFromBackStack() {
final int count = getFragmentManager().getBackStackEntryCount();
if (count == 0) {
@@ -738,13 +739,11 @@
} else {
setTitle(mInitialTitle);
}
- return 0;
+ return;
}
FragmentManager.BackStackEntry bse = getFragmentManager().getBackStackEntryAt(count - 1);
setTitleFromBackStackEntry(bse);
-
- return count;
}
private void setTitleFromBackStackEntry(FragmentManager.BackStackEntry bse) {
@@ -1196,6 +1195,7 @@
if (current != null && current instanceof SearchResultsSummary) {
mSearchResultsFragment = (SearchResultsSummary) current;
} else {
+ setContentHeaderView(null);
mSearchResultsFragment = (SearchResultsSummary) switchToFragment(
SearchResultsSummary.class.getName(), null, false, true,
R.string.search_results_title, null, true);