Merge "Fix for checking SUW/Setting Expressive style API" into main

This commit is contained in:
Jason Chang
2025-02-20 02:56:42 -08:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 4 deletions

View File

@@ -155,7 +155,8 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
final boolean isExpressiveStyle = BiometricUtils.isExpressiveStyle(getBaseContext()); final boolean isExpressiveStyle = BiometricUtils.isExpressiveStyle(
getBaseContext(), false);
if (shouldShowSplitScreenDialog()) { if (shouldShowSplitScreenDialog()) {
BiometricsSplitScreenDialog BiometricsSplitScreenDialog

View File

@@ -535,11 +535,13 @@ public class BiometricUtils {
/** /**
* Check if device is using Expressive Style theme. * Check if device is using Expressive Style theme.
* @param context that for applying Expressive Style * @param context that for applying Expressive Style
* @param isSettingsPreference Apply Expressive style on Settings Preference or not.
* @return true if device using Expressive Style theme, otherwise false. * @return true if device using Expressive Style theme, otherwise false.
*/ */
public static boolean isExpressiveStyle(@NonNull Context context) { public static boolean isExpressiveStyle(@NonNull Context context,
return SettingsThemeHelper.isExpressiveTheme(context) boolean isSettingsPreference) {
|| ThemeHelper.shouldApplyGlifExpressiveStyle(context); return isSettingsPreference ? SettingsThemeHelper.isExpressiveTheme(context) :
ThemeHelper.shouldApplyGlifExpressiveStyle(context);
} }
private static String capitalize(final String input) { private static String capitalize(final String input) {