Fix Settings app crashes when clicked on the magnification

1. Apply SetupWizardUtils.getTheme for AOSP / Nexus phone
2. Remove Magnification controller
3. Correct the description of the Talkback and Magnification page

Bug: 202792097
Test: manual test and upload fixed demo on bug
Change-Id: I108af30e3e2530bfabfcbdae03a7139a5b4e7a63
This commit is contained in:
menghanli
2021-10-13 13:05:49 +08:00
committed by Menghan Li
parent 502f53619f
commit f9ca092d58
6 changed files with 9 additions and 18 deletions

View File

@@ -36,6 +36,7 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.fragment.app.FragmentActivity;
import com.android.settings.R;
import com.android.settings.SetupWizardUtils;
import com.android.settings.SubSettings;
import com.android.settings.core.CategoryMixin.CategoryHandler;
import com.android.settingslib.core.lifecycle.HideNonSystemOverlayMixin;
@@ -91,17 +92,14 @@ public class SettingsBaseActivity extends FragmentActivity implements CategoryHa
// Apply SetupWizard light theme during setup flow. This is for SubSettings pages.
final boolean isAnySetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
if (isAnySetupWizard && this instanceof SubSettings) {
int appliedTheme;
if (ThemeHelper.trySetDynamicColor(this)) {
appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
final int appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
? R.style.SudDynamicColorThemeSettings_SetupWizard_DayNight
: R.style.SudDynamicColorThemeSettings_SetupWizard;
setTheme(appliedTheme);
} else {
appliedTheme = ThemeHelper.isSetupWizardDayNightEnabled(this)
? R.style.SubSettings_SetupWizard
: R.style.SudThemeGlifV3_Light;
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
}
setTheme(appliedTheme);
}
if (isToolbarEnabled() && !isAnySetupWizard) {