Change SUW theme style for Fingerprint and Face enrollment flow (1/n)
Apply SUW theme style for Fingerprint and Face enrollment flow
Flag: EXEMPT Using setup library's flag
Bug: 346562327
Test: manually build and perform a visual inspection.
Change-Id: I7cbcc04290ba1ddee1328afe3e4efbe1f36aff1c
diff --git a/src/com/android/settings/biometrics/BiometricEnrollBase.java b/src/com/android/settings/biometrics/BiometricEnrollBase.java
index 3285a95..c4c8dc0 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollBase.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollBase.java
@@ -148,8 +148,16 @@
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setTheme(SetupWizardUtils.getTheme(this, getIntent()));
- ThemeHelper.trySetDynamicColor(this);
+
+ if (ThemeHelper.shouldApplyGlifExpressiveStyle(getApplicationContext())) {
+ if (!ThemeHelper.trySetSuwTheme(this)) {
+ setTheme(ThemeHelper.getSuwDefaultTheme(getApplicationContext()));
+ ThemeHelper.trySetDynamicColor(this);
+ }
+ } else {
+ setTheme(SetupWizardUtils.getTheme(this, getIntent()));
+ ThemeHelper.trySetDynamicColor(this);
+ }
mChallenge = getIntent().getLongExtra(EXTRA_KEY_CHALLENGE, -1L);
mSensorId = getIntent().getIntExtra(EXTRA_KEY_SENSOR_ID, -1);
// Don't need to retrieve the HAT if it already exists. In some cases, the extras do not
diff --git a/src/com/android/settings/password/ConfirmLockPassword.java b/src/com/android/settings/password/ConfirmLockPassword.java
index 2665c37..a09db22 100644
--- a/src/com/android/settings/password/ConfirmLockPassword.java
+++ b/src/com/android/settings/password/ConfirmLockPassword.java
@@ -66,10 +66,13 @@
import com.android.internal.widget.TextViewInputDisabler;
import com.android.settings.R;
import com.android.settings.SetupRedactionInterstitial;
+import com.android.settings.SetupWizardUtils;
import com.android.settings.Utils;
import com.android.settingslib.animation.AppearAnimationUtils;
import com.android.settingslib.animation.DisappearAnimationUtils;
+import com.google.android.setupdesign.util.ThemeHelper;
+
import java.util.ArrayList;
public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
@@ -85,6 +88,18 @@
public static class InternalActivity extends ConfirmLockPassword {
}
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ if (ThemeHelper.shouldApplyGlifExpressiveStyle(getApplicationContext())) {
+ if (!ThemeHelper.trySetSuwTheme(this)) {
+ setTheme(ThemeHelper.getSuwDefaultTheme(getApplicationContext()));
+ ThemeHelper.trySetDynamicColor(this);
+ }
+ }
+ }
+
@Override
public Intent getIntent() {
Intent modIntent = new Intent(super.getIntent());