diff --git a/main/java/com/google/android/setupcompat/util/WizardManagerHelper.java b/main/java/com/google/android/setupcompat/util/WizardManagerHelper.java
index 84bd68b..90de25e 100644
--- a/main/java/com/google/android/setupcompat/util/WizardManagerHelper.java
+++ b/main/java/com/google/android/setupcompat/util/WizardManagerHelper.java
@@ -186,6 +186,17 @@
   }
 
   /**
+   * Checks whether an intent is running in the portal setup wizard flow.
+   *
+   * @param originalIntent The original intent that was used to start the step, usually via {@link
+   *     Activity#getIntent()}.
+   * @return true if the intent passed in was running in portal setup wizard.
+   */
+  public static boolean isPortalSetupWizard(Intent originalIntent) {
+    return originalIntent != null && originalIntent.getBooleanExtra(EXTRA_IS_PORTAL_SETUP, false);
+  }
+
+  /**
    * Checks whether an intent is running in the deferred setup wizard flow.
    *
    * @param originalIntent The original intent that was used to start the step, usually via {@link
diff --git a/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigHelper.java b/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigHelper.java
index 98f6b6b..aca9a07 100644
--- a/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigHelper.java
+++ b/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfigHelper.java
@@ -35,6 +35,7 @@
 import androidx.annotation.Nullable;
 import androidx.annotation.VisibleForTesting;
 import com.google.android.setupcompat.partnerconfig.PartnerConfig.ResourceType;
+import com.google.android.setupcompat.util.BuildCompatUtils;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EnumMap;
@@ -547,10 +548,10 @@
     if (fallbackBundle != null) {
       resourceEntryBundle.putBundle(KEY_FALLBACK_CONFIG, fallbackBundle.getBundle(resourceName));
     }
-    ResourceEntry tempResult =
+    ResourceEntry adjustResourceEntry =
         adjustResourceEntryDefaultValue(
             context, ResourceEntry.fromBundle(context, resourceEntryBundle));
-    return adjustResourceEntryDayNightMode(context, tempResult);
+    return adjustResourceEntryDayNightMode(context, adjustResourceEntry);
   }
 
   /**
@@ -576,11 +577,10 @@
   }
 
   // Check the MNStyle flag and replace the inputResourceEntry.resourceName &
-  // inputResourceEntry.resourceId
-  private ResourceEntry adjustResourceEntryDefaultValue(
-      Context context, ResourceEntry inputResourceEntry) {
-    boolean useMaterialYouDefaultValue = shouldApplyMaterialYouStyle(context);
-    if (useMaterialYouDefaultValue) {
+  // inputResourceEntry.resourceId after T, that means if using Gliv4 before S, will always use
+  // glifv3 resources.
+  ResourceEntry adjustResourceEntryDefaultValue(Context context, ResourceEntry inputResourceEntry) {
+    if (BuildCompatUtils.isAtLeastT() && shouldApplyMaterialYouStyle(context)) {
       // If not overlay resource
       try {
         if (SUW_PACKAGE_NAME.equals(inputResourceEntry.getPackageName())) {
@@ -678,9 +678,12 @@
             IS_EXTENDED_PARTNER_CONFIG_ENABLED_METHOD, false));
   }
 
-  /** Returns true if the SetupWizard is flow enabled "Material You(Glifv4)" style. */
+  /**
+   * Returns true if the SetupWizard is flow enabled "Material You(Glifv4)" style, or the result of
+   * shouldApplyExtendedPartnerConfig() in SDK S as fallback.
+   */
   public static boolean shouldApplyMaterialYouStyle(@NonNull Context context) {
-    if (applyMaterialYouConfigBundle == null) {
+    if (applyMaterialYouConfigBundle == null || applyMaterialYouConfigBundle.isEmpty()) {
       try {
         applyMaterialYouConfigBundle =
             context
@@ -690,6 +693,13 @@
                     IS_MATERIAL_YOU_STYLE_ENABLED_METHOD,
                     /* arg= */ null,
                     /* extras= */ null);
+        // The suw version did not support the flag yet, fallback to
+        // shouldApplyExtendedPartnerConfig() for SDK S.
+        if (applyMaterialYouConfigBundle != null
+            && applyMaterialYouConfigBundle.isEmpty()
+            && !BuildCompatUtils.isAtLeastT()) {
+          return shouldApplyExtendedPartnerConfig(context);
+        }
       } catch (IllegalArgumentException | SecurityException exception) {
         Log.w(TAG, "SetupWizard Material You configs supporting status unknown; return as false.");
         applyMaterialYouConfigBundle = null;
