summaryrefslogtreecommitdiff
path: root/library/main/src
diff options
context:
space:
mode:
authorAjay Nadathur <ajayns@google.com>2017-10-16 16:02:33 -0700
committerAjay Nadathur <ajayns@google.com>2017-10-16 16:23:33 -0700
commitbeea4d67b53a2ee83eb85df452fdac5add971754 (patch)
treebffc8a3c7fe6fb06775b4e9079bb610d40f19af6 /library/main/src
parentb2a38dd86b4065e376f37aeda2083df712eed16c (diff)
downloadsetupwizard-beea4d67b53a2ee83eb85df452fdac5add971754.tar.gz
Add "isPreDeferredSetupWizard" to WizardManagerHelper
bug: 67782334 Test: Manually tested Change-Id: Ic75eac6fd743a526e2cf61a12eecf66da7fa02b1
Diffstat (limited to 'library/main/src')
-rw-r--r--library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java b/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java
index a93694c..896c013 100644
--- a/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java
+++ b/library/main/src/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.