Remove the feature flag for using new title.
- remove all code that check for the feature flag, and use the new logic
by default.
Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 1a013cc..f1c2a0a 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -209,12 +209,7 @@
@Override
public boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) {
- if (InstrumentedPreferenceFragment.usePreferenceScreenTitle()) {
- startPreferencePanel(caller, pref.getFragment(), pref.getExtras(), -1, null, null, 0);
- } else {
- startPreferencePanel(caller, pref.getFragment(), pref.getExtras(), -1, pref.getTitle(),
- null, 0);
- }
+ startPreferencePanel(caller, pref.getFragment(), pref.getExtras(), -1, null, null, 0);
return true;
}
@@ -631,13 +626,8 @@
public void startPreferencePanel(Fragment caller, String fragmentClass, Bundle args,
int titleRes, CharSequence titleText, Fragment resultTo, int resultRequestCode) {
String title = null;
- if (titleRes < 0) {
- if (titleText != null) {
- title = titleText.toString();
- } else if (!InstrumentedPreferenceFragment.usePreferenceScreenTitle()) {
- // There not much we can do in that case
- title = "";
- }
+ if (titleRes < 0 && titleText != null) {
+ title = titleText.toString();
}
Utils.startWithFragment(this, fragmentClass, args, resultTo, resultRequestCode,
titleRes, title, mIsShortcut, mMetricsFeatureProvider.getMetricsCategory(caller));