diff --git a/src/org/lineageos/setupwizard/FinishActivity.java b/src/org/lineageos/setupwizard/FinishActivity.java
index af55c4a..bb6a278 100644
--- a/src/org/lineageos/setupwizard/FinishActivity.java
+++ b/src/org/lineageos/setupwizard/FinishActivity.java
@@ -11,8 +11,6 @@
 import static android.os.UserHandle.USER_CURRENT;
 
 import static org.lineageos.setupwizard.Manifest.permission.FINISH_SETUP;
-import static org.lineageos.setupwizard.SetupWizardApp.ACTION_FINISHED;
-import static org.lineageos.setupwizard.SetupWizardApp.ACTION_SETUP_COMPLETE;
 import static org.lineageos.setupwizard.SetupWizardApp.LOGV;
 import static org.lineageos.setupwizard.SetupWizardApp.NAVIGATION_OPTION_KEY;
 
diff --git a/src/org/lineageos/setupwizard/util/SetupWizardUtils.java b/src/org/lineageos/setupwizard/util/SetupWizardUtils.java
index 7b10a1f..d67d681 100644
--- a/src/org/lineageos/setupwizard/util/SetupWizardUtils.java
+++ b/src/org/lineageos/setupwizard/util/SetupWizardUtils.java
@@ -18,12 +18,8 @@
 
 import static com.google.android.setupcompat.util.ResultCodes.RESULT_SKIP;
 
-import static org.lineageos.setupwizard.SetupWizardApp.DISABLE_NAV_KEYS;
-import static org.lineageos.setupwizard.SetupWizardApp.ENABLE_RECOVERY_UPDATE;
-import static org.lineageos.setupwizard.SetupWizardApp.KEY_SEND_METRICS;
 import static org.lineageos.setupwizard.SetupWizardApp.LOGV;
 import static org.lineageos.setupwizard.SetupWizardApp.NAVIGATION_OPTION_KEY;
-import static org.lineageos.setupwizard.SetupWizardApp.UPDATE_RECOVERY_PROP;
 
 import android.app.StatusBarManager;
 import android.app.WallpaperManager;
@@ -61,8 +57,6 @@
 import java.io.File;
 import java.util.List;
 
-import lineageos.providers.LineageSettings;
-
 public class SetupWizardUtils {
 
     private static final String TAG = SetupWizardUtils.class.getSimpleName();
@@ -195,9 +189,6 @@
                     Settings.Secure.TV_USER_SETUP_COMPLETE, 1);
         }
 
-        handleEnableMetrics(context);
-        handleNavKeys(context);
-        handleRecoveryUpdate();
         handleNavigationOption();
         WallpaperManager.getInstance(context).forgetLoadedWallpaper();
         disableHome(context);
@@ -293,33 +284,6 @@
                 enabledState, DONT_KILL_APP);
     }
 
-    private static void handleEnableMetrics(Context context) {
-        Bundle privacyData = SetupWizardApp.getSettingsBundle();
-        if (privacyData != null
-                && privacyData.containsKey(KEY_SEND_METRICS)) {
-            LineageSettings.Secure.putInt(context.getContentResolver(),
-                    LineageSettings.Secure.STATS_COLLECTION,
-                    privacyData.getBoolean(KEY_SEND_METRICS)
-                            ? 1 : 0);
-        }
-    }
-
-    private static void handleNavKeys(Context context) {
-        if (SetupWizardApp.getSettingsBundle().containsKey(DISABLE_NAV_KEYS)) {
-            writeDisableNavkeysOption(context,
-                    SetupWizardApp.getSettingsBundle().getBoolean(DISABLE_NAV_KEYS));
-        }
-    }
-
-    private static void handleRecoveryUpdate() {
-        if (SetupWizardApp.getSettingsBundle().containsKey(ENABLE_RECOVERY_UPDATE)) {
-            boolean update = SetupWizardApp.getSettingsBundle()
-                    .getBoolean(ENABLE_RECOVERY_UPDATE);
-
-            SystemProperties.set(UPDATE_RECOVERY_PROP, String.valueOf(update));
-        }
-    }
-
     private static void handleNavigationOption() {
         Bundle settingsBundle = SetupWizardApp.getSettingsBundle();
         if (settingsBundle.containsKey(NAVIGATION_OPTION_KEY)) {
@@ -335,17 +299,6 @@
         }
     }
 
-    private static void writeDisableNavkeysOption(Context context, boolean enabled) {
-        final boolean virtualKeysEnabled = LineageSettings.System.getIntForUser(
-                context.getContentResolver(), LineageSettings.System.FORCE_SHOW_NAVBAR, 0,
-                UserHandle.USER_CURRENT) != 0;
-        if (enabled != virtualKeysEnabled) {
-            LineageSettings.System.putIntForUser(context.getContentResolver(),
-                    LineageSettings.System.FORCE_SHOW_NAVBAR, enabled ? 1 : 0,
-                    UserHandle.USER_CURRENT);
-        }
-    }
-
     public static long getBuildDateTimestamp() {
         return SystemProperties.getLong(PROP_BUILD_DATE, 0);
     }
