Update UI for factory reset flow

After applying a collapsing toolbar in the Settings app, the factory
reset screen is not displayed correctly. This is because
1) the factory reset page should not essentially have a toolbar since it
has different UI layout form other pages.
2) this page was launched previously as a SubSettings so it applied a
wrong theme.

This change is mainly updating the inheritence structure and specifying
the right theme for the factory reset page in order to have a correct
layout.

Bug: 179457252
Test: robotests and visual verified
Change-Id: I91aec65a120d5a288507d89ace7c9298acdca42b
This commit is contained in:
Mill Chen
2021-02-25 15:03:25 +08:00
parent 8767313e05
commit 1e607904c3
4 changed files with 50 additions and 8 deletions

View File

@@ -123,7 +123,30 @@ public class Settings extends SettingsActivity {
public static class ScanningSettingsActivity extends SettingsActivity { /* empty */ }
public static class PrivacyDashboardActivity extends SettingsActivity { /* empty */ }
public static class PrivacySettingsActivity extends SettingsActivity { /* empty */ }
public static class FactoryResetActivity extends SettingsActivity { /* empty */ }
public static class FactoryResetActivity extends SettingsActivity {
@Override
protected void onCreate(Bundle savedState) {
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
super.onCreate(savedState);
}
@Override
protected boolean isToolbarEnabled() {
return false;
}
}
public static class FactoryResetConfirmActivity extends SettingsActivity {
@Override
protected void onCreate(Bundle savedState) {
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
super.onCreate(savedState);
}
@Override
protected boolean isToolbarEnabled() {
return false;
}
}
public static class RunningServicesActivity extends SettingsActivity { /* empty */ }
public static class BatterySaverSettingsActivity extends SettingsActivity { /* empty */ }
public static class BatterySaverScheduleSettingsActivity extends SettingsActivity { /* empty */ }