From 202f9273e02a5ffe73e5f2dbacfd2e6c1155ead3 Mon Sep 17 00:00:00 2001 From: cretin45 Date: Mon, 26 Jan 2015 16:08:19 -0800 Subject: [PATCH] SetupWizard: Don't run wizard if user_setup_complete is set Change-Id: I2e97ecb4fa0458b117e0250595306706245c9c67 --- AndroidManifest.xml | 2 ++ .../setupwizard/ui/SetupWizardActivity.java | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3b1a3b3..b0290d0 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -19,6 +19,8 @@ android:versionCode="3" android:sharedUserId="android.uid.system"> + + diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java index 8066ba4..6d05c26 100644 --- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java +++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java @@ -81,6 +81,16 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks if (savedInstanceState != null && savedInstanceState.containsKey("data")) { mSetupData.load(savedInstanceState.getBundle("data")); } + // Since this is a new component, we need to disable here if the user + // has already been through setup on a previous version. + try { + if (Settings.Secure.getInt(getContentResolver(), + Settings.Secure.USER_SETUP_COMPLETE) == 1) { + finishSetup(); + } + } catch (Settings.SettingNotFoundException e) { + // Continue with setup + } } @Override