diff options
Diffstat (limited to 'com/android/setupwizardlib/util/WizardManagerHelper.java')
-rw-r--r-- | com/android/setupwizardlib/util/WizardManagerHelper.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/com/android/setupwizardlib/util/WizardManagerHelper.java b/com/android/setupwizardlib/util/WizardManagerHelper.java index a93694c1..896c0137 100644 --- a/com/android/setupwizardlib/util/WizardManagerHelper.java +++ b/com/android/setupwizardlib/util/WizardManagerHelper.java @@ -45,6 +45,8 @@ public class WizardManagerHelper { static final String EXTRA_IS_FIRST_RUN = "firstRun"; @VisibleForTesting static final String EXTRA_IS_DEFERRED_SETUP = "deferredSetup"; + @VisibleForTesting + static final String EXTRA_IS_PRE_DEFERRED_SETUP = "preDeferredSetup"; public static final String EXTRA_THEME = "theme"; public static final String EXTRA_USE_IMMERSIVE_MODE = "useImmersiveMode"; @@ -213,6 +215,18 @@ public class WizardManagerHelper { } /** + * Checks whether an intent is running in "pre-deferred" setup wizard flow. + * + * @param originalIntent The original intent that was used to start the step, usually via + * {@link android.app.Activity#getIntent()}. + * @return true if the intent passed in was running in "pre-deferred" setup wizard. + */ + public static boolean isPreDeferredSetupWizard(Intent originalIntent) { + return originalIntent != null + && originalIntent.getBooleanExtra(EXTRA_IS_PRE_DEFERRED_SETUP, false); + } + + /** * Checks the intent whether the extra indicates that the light theme should be used or not. If * the theme is not specified in the intent, or the theme specified is unknown, the value def * will be returned. |