SUW: Cleanup intent extras

Remove unused extras:
allowSkip: Removed in 2015
wifi_auto_finish_on_connect: Removed in 2016

Use WizardManagerHelper definitions when possible

Change-Id: I4e6a503ae030b85486921fcacfc4fe03e37c8698
diff --git a/src/org/lineageos/setupwizard/BaseSetupWizardActivity.java b/src/org/lineageos/setupwizard/BaseSetupWizardActivity.java
index ae4f1c9..512e75b 100644
--- a/src/org/lineageos/setupwizard/BaseSetupWizardActivity.java
+++ b/src/org/lineageos/setupwizard/BaseSetupWizardActivity.java
@@ -26,7 +26,6 @@
 import static org.lineageos.setupwizard.SetupWizardApp.ACTION_NEXT;
 import static org.lineageos.setupwizard.SetupWizardApp.ACTION_SETUP_COMPLETE;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_ACTION_ID;
-import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_FIRST_RUN;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_HAS_MULTIPLE_USERS;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_RESULT_CODE;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_SCRIPT_URI;
@@ -561,7 +560,7 @@
         if (LOGV) {
             Log.v(TAG, "starting activity " + intent);
         }
-        intent.putExtra(EXTRA_FIRST_RUN, isFirstRun());
+        intent.putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, isFirstRun());
         intent.putExtra(EXTRA_HAS_MULTIPLE_USERS, hasMultipleUsers());
         startActivity(intent);
     }
@@ -570,7 +569,7 @@
         if (LOGV) {
             Log.v(TAG, "startFirstRunActivityForResult requestCode=" + requestCode);
         }
-        intent.putExtra(EXTRA_FIRST_RUN, isFirstRun());
+        intent.putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, isFirstRun());
         intent.putExtra(EXTRA_HAS_MULTIPLE_USERS, hasMultipleUsers());
         startActivityForResult(intent, requestCode);
     }
diff --git a/src/org/lineageos/setupwizard/BiometricActivity.java b/src/org/lineageos/setupwizard/BiometricActivity.java
index 21235aa..ce3325c 100644
--- a/src/org/lineageos/setupwizard/BiometricActivity.java
+++ b/src/org/lineageos/setupwizard/BiometricActivity.java
@@ -18,12 +18,7 @@
 package org.lineageos.setupwizard;
 
 import static org.lineageos.setupwizard.SetupWizardApp.ACTION_SETUP_BIOMETRIC;
-import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_ALLOW_SKIP;
-import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_AUTO_FINISH;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_DETAILS;
-import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_FIRST_RUN;
-import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_MATERIAL_LIGHT;
-import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_THEME;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_TITLE;
 import static org.lineageos.setupwizard.SetupWizardApp.REQUEST_CODE_SETUP_BIOMETRIC;
 
@@ -33,6 +28,7 @@
 import android.widget.TextView;
 
 import com.google.android.setupcompat.util.WizardManagerHelper;
+import com.google.android.setupdesign.util.ThemeHelper;
 
 import org.lineageos.setupwizard.util.SetupWizardUtils;
 
@@ -83,11 +79,7 @@
 
     private void launchBiometricSetup() {
         Intent intent = new Intent(ACTION_SETUP_BIOMETRIC);
-        intent.putExtra(EXTRA_FIRST_RUN, true);
-        intent.putExtra(EXTRA_ALLOW_SKIP, true);
-        intent.putExtra(EXTRA_THEME, EXTRA_MATERIAL_LIGHT);
-        intent.putExtra(EXTRA_AUTO_FINISH, false);
-            /*intent.putExtra(LockPatternUtils.LOCKSCREEN_BIOMETRIC_FALLBACK, true);*/
+        intent.putExtra(WizardManagerHelper.EXTRA_THEME, ThemeHelper.THEME_MATERIAL_LIGHT);
         intent.putExtra(EXTRA_TITLE,
                 getString(getTitleResId()));
         intent.putExtra(EXTRA_DETAILS,
diff --git a/src/org/lineageos/setupwizard/ScreenLockActivity.java b/src/org/lineageos/setupwizard/ScreenLockActivity.java
index 70b619b..92fa528 100644
--- a/src/org/lineageos/setupwizard/ScreenLockActivity.java
+++ b/src/org/lineageos/setupwizard/ScreenLockActivity.java
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 The CyanogenMod Project
- * Copyright (C) 2017-2020 The LineageOS Project
+ * Copyright (C) 2017-2021 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -72,7 +72,6 @@
                 getString(R.string.settings_lockscreen_setup_title));
         intent.putExtra(EXTRA_DETAILS,
                 getString(R.string.settings_lockscreen_setup_details));
-        intent.putExtra(SetupWizardApp.EXTRA_ALLOW_SKIP, true);
         startSubactivity(intent, REQUEST_CODE_SETUP_LOCKSCREEN);
     }
 
diff --git a/src/org/lineageos/setupwizard/SetupWizardApp.java b/src/org/lineageos/setupwizard/SetupWizardApp.java
index 993d532..df35c24 100644
--- a/src/org/lineageos/setupwizard/SetupWizardApp.java
+++ b/src/org/lineageos/setupwizard/SetupWizardApp.java
@@ -45,13 +45,7 @@
     public static final String ACTION_NEXT = "com.android.wizard.NEXT";
     public static final String ACTION_LOAD = "com.android.wizard.LOAD";
 
-
-    public static final String EXTRA_FIRST_RUN = "firstRun";
-    public static final String EXTRA_ALLOW_SKIP = "allowSkip";
-    public static final String EXTRA_AUTO_FINISH = "wifi_auto_finish_on_connect";
     public static final String EXTRA_HAS_MULTIPLE_USERS = "hasMultipleUsers";
-    public static final String EXTRA_THEME = "theme";
-    public static final String EXTRA_MATERIAL_LIGHT = "material_light";
     public static final String EXTRA_TITLE = "title";
     public static final String EXTRA_DETAILS = "details";
     public static final String EXTRA_SCRIPT_URI = "scriptUri";
@@ -59,7 +53,6 @@
     public static final String EXTRA_RESULT_CODE = "com.android.setupwizard.ResultCode";
     public static final String EXTRA_PREFS_SHOW_BUTTON_BAR = "extra_prefs_show_button_bar";
     public static final String EXTRA_PREFS_SET_BACK_TEXT = "extra_prefs_set_back_text";
-    public static final String EXTRA_IS_SETUP_FLOW = "isSetupFlow";
 
     public static final String KEY_DETECT_CAPTIVE_PORTAL = "captive_portal_detection_enabled";
     public static final String KEY_SEND_METRICS = "send_metrics";
diff --git a/src/org/lineageos/setupwizard/WifiSetupActivity.java b/src/org/lineageos/setupwizard/WifiSetupActivity.java
index 69cef39..151a1aa 100644
--- a/src/org/lineageos/setupwizard/WifiSetupActivity.java
+++ b/src/org/lineageos/setupwizard/WifiSetupActivity.java
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 The CyanogenMod Project
- * Copyright (C) 2017-2018,2020 The LineageOS Project
+ * Copyright (C) 2017-2021 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,6 +18,8 @@
 package org.lineageos.setupwizard;
 
 import static org.lineageos.setupwizard.SetupWizardApp.ACTION_SETUP_WIFI;
+import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_PREFS_SET_BACK_TEXT;
+import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_PREFS_SHOW_BUTTON_BAR;
 import static org.lineageos.setupwizard.SetupWizardApp.REQUEST_CODE_SETUP_WIFI;
 
 import android.content.Intent;
@@ -36,8 +38,8 @@
         if (SetupWizardUtils.hasLeanback(this)) {
             intent.setComponent(SetupWizardUtils.mTvwifisettingsActivity);
         }
-        intent.putExtra(SetupWizardApp.EXTRA_PREFS_SHOW_BUTTON_BAR, true);
-        intent.putExtra(SetupWizardApp.EXTRA_PREFS_SET_BACK_TEXT, (String) null);
+        intent.putExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, true);
+        intent.putExtra(EXTRA_PREFS_SET_BACK_TEXT, (String) null);
         startSubactivity(intent, REQUEST_CODE_SETUP_WIFI);
     }
 }
diff --git a/src/org/lineageos/setupwizard/wizardmanager/WizardManager.java b/src/org/lineageos/setupwizard/wizardmanager/WizardManager.java
index 9e05aad..e0d7255 100644
--- a/src/org/lineageos/setupwizard/wizardmanager/WizardManager.java
+++ b/src/org/lineageos/setupwizard/wizardmanager/WizardManager.java
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 The CyanogenMod Project
- * Copyright (C) 2017 The LineageOS Project
+ * Copyright (C) 2017-2021 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
 import static org.lineageos.setupwizard.SetupWizardApp.ACTION_LOAD;
 import static org.lineageos.setupwizard.SetupWizardApp.ACTION_NEXT;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_ACTION_ID;
-import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_FIRST_RUN;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_RESULT_CODE;
 import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_SCRIPT_URI;
 import static org.lineageos.setupwizard.SetupWizardApp.LOGV;
@@ -87,7 +86,7 @@
     }
 
     private void addExtras(Intent intent) {
-        intent.putExtra(EXTRA_FIRST_RUN, true);
+        intent.putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, true);
         intent.putExtra(WizardManagerHelper.EXTRA_THEME, ThemeHelper.THEME_MATERIAL_LIGHT);
     }