From d3cd751f024137d68b9bf47cac5f1f714715925a Mon Sep 17 00:00:00 2001 From: Tsung-Mao Fang Date: Wed, 5 May 2021 15:43:54 +0800 Subject: [PATCH] Apply dynamic color for Erase all data(factory reset screen Enable the dynamic color flag, and remove some unused theme in layout. Test: Rebuilt apk and see the screen Fix: 185557130 Change-Id: I7ed73c808be4942e5ffd461982e73a4ff7f7f2db --- res/layout/main_clear.xml | 1 - res/layout/main_clear_confirm.xml | 1 - src/com/android/settings/Settings.java | 4 ++++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/res/layout/main_clear.xml b/res/layout/main_clear.xml index 1cf19092b49..cbccb0a11ad 100644 --- a/res/layout/main_clear.xml +++ b/res/layout/main_clear.xml @@ -21,7 +21,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:theme="@style/GlifV3Theme.Footer" android:icon="@drawable/ic_delete_accent" app:sucHeaderText="@string/main_clear_title"> diff --git a/res/layout/main_clear_confirm.xml b/res/layout/main_clear_confirm.xml index 95262a0f483..914a99882e2 100644 --- a/res/layout/main_clear_confirm.xml +++ b/res/layout/main_clear_confirm.xml @@ -19,7 +19,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:theme="@style/SudThemeGlifV3.DayNight" android:id="@+id/setup_wizard_layout" android:icon="@drawable/ic_delete_accent" app:sucHeaderText="@string/main_clear_confirm_title"> diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java index d28f86d079e..23fbf08cf31 100644 --- a/src/com/android/settings/Settings.java +++ b/src/com/android/settings/Settings.java @@ -28,6 +28,8 @@ import com.android.settings.enterprise.EnterprisePrivacySettings; import com.android.settings.overlay.FeatureFactory; import com.android.settings.security.SecuritySettingsFeatureProvider; +import com.google.android.setupdesign.util.ThemeHelper; + /** * Top-level Settings activity */ @@ -164,6 +166,7 @@ public class Settings extends SettingsActivity { @Override protected void onCreate(Bundle savedState) { setTheme(SetupWizardUtils.getTheme(this, getIntent())); + ThemeHelper.trySetDynamicColor(this); super.onCreate(savedState); } @@ -176,6 +179,7 @@ public class Settings extends SettingsActivity { @Override protected void onCreate(Bundle savedState) { setTheme(SetupWizardUtils.getTheme(this, getIntent())); + ThemeHelper.trySetDynamicColor(this); super.onCreate(savedState); }