Apply the correct style to Battery and Storage page

Since some pages were styling the action bar programmatically before, the
color of collapsing toolbar will be overridden. Removing them will fix
the problem with inconsist color. This change also fixed some pages with
inconsist theme.

Bug: 185444608
Test: visual verified
1) Settings -> Battery / Storage
2) Scrolling the collapsing toolbar and make it collapsed
3) Observe and see if the color of toolbar is different from the one of
status bar

Change-Id: I5e792747ea3f4deb05428ea5afe6a64f29f9da89
This commit is contained in:
Mill Chen
2021-04-16 00:25:50 +08:00
parent 089c56520d
commit e545bff7da
3 changed files with 3 additions and 4 deletions

View File

@@ -2425,6 +2425,7 @@
<activity android:name="Settings$ChooseAccountActivity"
android:label="@string/header_add_an_account"
android:theme="@style/Theme.SubSettings"
android:configChanges="orientation|keyboardHidden|screenSize">
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.accounts.ChooseAccountFragment" />

View File

@@ -336,8 +336,7 @@ public class StorageDashboardFragment extends DashboardFragment
final Activity activity = getActivity();
EntityHeaderController.newInstance(activity, this /*fragment*/,
null /* header view */)
.setRecyclerView(getListView(), getSettingsLifecycle())
.styleActionBar(activity);
.setRecyclerView(getListView(), getSettingsLifecycle());
}
@Override

View File

@@ -105,8 +105,7 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
@Override
public void onStart() {
EntityHeaderController.newInstance(mActivity, mHost, null /* header view */)
.setRecyclerView(mHost.getListView(), mLifecycle)
.styleActionBar(mActivity);
.setRecyclerView(mHost.getListView(), mLifecycle);
}
private CharSequence generateLabel(BatteryInfo info) {