summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Lee <cyrillee@google.com>2019-03-28 22:41:29 +0800
committerCyril Lee <cyrillee@google.com>2019-03-28 14:57:55 +0000
commitf2abf71d833633b5c78249164b471e07d12dcfb7 (patch)
treed4d0f1ccfa3d6b82ef0a0be0a353328a3001714d
parent67c702155426e3a7848f20b59ba03f871bc3e3cb (diff)
downloadsetupwizard-f2abf71d833633b5c78249164b471e07d12dcfb7.tar.gz
Support isSetupFlow extra in the deprecated setupwizardlib library
The isSetupFlow extra is introduced in SetupCompat/SetupDesign library. However, the client use this setupwizardlib library will lead WizardScriptHelper#isAnySetupWizard() of SetupCompat not work from Android Q since isSetupFlow extra will be truncated. Success log for after patching setupwizardlib and replacing FactoryOta http://gpaste/5367975093731328 Bug: b/129445834 Test: mma and manual test Change-Id: Ia5ba16d2bf3d3b3e489a52369f234819165d5de7
-rw-r--r--library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java b/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java
index 2342fa5..4d75c78 100644
--- a/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java
+++ b/library/main/src/com/android/setupwizardlib/util/WizardManagerHelper.java
@@ -47,6 +47,7 @@ public class WizardManagerHelper {
@VisibleForTesting 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";
+ @VisibleForTesting public static final String EXTRA_IS_SETUP_FLOW = "isSetupFlow";
public static final String EXTRA_THEME = "theme";
public static final String EXTRA_USE_IMMERSIVE_MODE = "useImmersiveMode";
@@ -143,7 +144,11 @@ public class WizardManagerHelper {
public static void copyWizardManagerExtras(Intent srcIntent, Intent dstIntent) {
dstIntent.putExtra(EXTRA_WIZARD_BUNDLE, srcIntent.getBundleExtra(EXTRA_WIZARD_BUNDLE));
for (String key :
- Arrays.asList(EXTRA_IS_FIRST_RUN, EXTRA_IS_DEFERRED_SETUP, EXTRA_IS_PRE_DEFERRED_SETUP)) {
+ Arrays.asList(
+ EXTRA_IS_FIRST_RUN,
+ EXTRA_IS_DEFERRED_SETUP,
+ EXTRA_IS_PRE_DEFERRED_SETUP,
+ EXTRA_IS_SETUP_FLOW)) {
dstIntent.putExtra(key, srcIntent.getBooleanExtra(key, false));
}