public class WizardManagerHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EXTRA_THEME |
static String |
EXTRA_USE_IMMERSIVE_MODE |
static String |
SETTINGS_GLOBAL_DEVICE_PROVISIONED |
static String |
SETTINGS_SECURE_USER_SETUP_COMPLETE |
static String |
THEME_GLIF
Passed in a setup wizard intent as
EXTRA_THEME . |
static String |
THEME_GLIF_LIGHT
Passed in a setup wizard intent as
EXTRA_THEME . |
static String |
THEME_HOLO |
static String |
THEME_HOLO_LIGHT |
static String |
THEME_MATERIAL |
static String |
THEME_MATERIAL_BLUE
Deprecated.
This constant is not used and will not be passed by any released version of setup
wizard.
|
static String |
THEME_MATERIAL_BLUE_LIGHT
Deprecated.
This constant is not used and will not be passed by any released version of setup
wizard.
|
static String |
THEME_MATERIAL_LIGHT |
Constructor and Description |
---|
WizardManagerHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
copyWizardManagerExtras(Intent srcIntent,
Intent dstIntent)
Copy the internal extras used by setup wizard from one intent to another.
|
static Intent |
getNextIntent(Intent originalIntent,
int resultCode)
Get an intent that will invoke the next step of setup wizard.
|
static Intent |
getNextIntent(Intent originalIntent,
int resultCode,
Intent data)
Get an intent that will invoke the next step of setup wizard.
|
static boolean |
isDeviceProvisioned(Context context)
Checks whether the device is provisioned.
|
static boolean |
isLightTheme(Intent intent,
boolean def)
Checks the intent whether the extra indicates that the light theme should be used or not.
|
static boolean |
isLightTheme(String theme,
boolean def)
Checks whether
theme represents a light or dark theme. |
static boolean |
isSetupWizardIntent(Intent intent)
Check whether an intent is intended to be used within the setup wizard flow.
|
static boolean |
isUserSetupComplete(Context context)
Checks whether the current user has completed Setup Wizard.
|
public static final String EXTRA_THEME
public static final String EXTRA_USE_IMMERSIVE_MODE
public static final String SETTINGS_GLOBAL_DEVICE_PROVISIONED
public static final String SETTINGS_SECURE_USER_SETUP_COMPLETE
public static final String THEME_HOLO
public static final String THEME_HOLO_LIGHT
public static final String THEME_MATERIAL
public static final String THEME_MATERIAL_LIGHT
@Deprecated public static final String THEME_MATERIAL_BLUE
@Deprecated public static final String THEME_MATERIAL_BLUE_LIGHT
public static final String THEME_GLIF
EXTRA_THEME
. This is the dark variant of the
theme used in setup wizard for NYC.public static final String THEME_GLIF_LIGHT
EXTRA_THEME
. This is the default theme used in
setup wizard for NYC.public static Intent getNextIntent(Intent originalIntent, int resultCode)
originalIntent
- The original intent that was used to start the step, usually via
Activity.getIntent()
.resultCode
- The result code of the step. See ResultCodes
.Activity.startActivityForResult(Intent, int)
to start the next
step of the setup flow.public static Intent getNextIntent(Intent originalIntent, int resultCode, Intent data)
originalIntent
- The original intent that was used to start the step, usually via
Activity.getIntent()
.resultCode
- The result code of the step. See ResultCodes
.data
- An intent containing extra result data.Activity.startActivityForResult(Intent, int)
to start the next
step of the setup flow.public static void copyWizardManagerExtras(Intent srcIntent, Intent dstIntent)
Intent.FLAG_ACTIVITY_FORWARD_RESULT
to relay to another
intent.srcIntent
- Intent to get the wizard manager extras from.dstIntent
- Intent to copy the wizard manager extras to.public static boolean isSetupWizardIntent(Intent intent)
intent
- The intent to be checked, usually from
Activity.getIntent()
.public static boolean isUserSetupComplete(Context context)
context
- The context to retrieve the settings.isDeviceProvisioned(android.content.Context)
public static boolean isDeviceProvisioned(Context context)
context
- The context to retrieve the settings.isUserSetupComplete(android.content.Context)
public static boolean isLightTheme(Intent intent, boolean def)
intent
- The intent used to start the activity, which the theme extra will be read from.def
- The default value if the theme is not specified.public static boolean isLightTheme(String theme, boolean def)
theme
represents a light or dark theme. If the theme specified is
unknown, the value def will be returned.theme
- The theme as specified from an intent sent from setup wizard.def
- The default value if the theme is not known.theme
represents a light theme.