summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-01-26 16:08:19 -0800
committercretin45 <cretin45@gmail.com>2015-01-26 16:24:05 -0800
commit202f9273e02a5ffe73e5f2dbacfd2e6c1155ead3 (patch)
tree8e75b54f66c974c2c142fa6919c9259571b0f49e
parent0d39727f843ad7be83118e07d38ac67c145cb18f (diff)
downloadpackages_apps_SetupWizard-202f9273e02a5ffe73e5f2dbacfd2e6c1155ead3.zip
packages_apps_SetupWizard-202f9273e02a5ffe73e5f2dbacfd2e6c1155ead3.tar.gz
packages_apps_SetupWizard-202f9273e02a5ffe73e5f2dbacfd2e6c1155ead3.tar.bz2
SetupWizard: Don't run wizard if user_setup_complete is set
Change-Id: I2e97ecb4fa0458b117e0250595306706245c9c67
-rw-r--r--AndroidManifest.xml2
-rw-r--r--src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java10
2 files changed, 12 insertions, 0 deletions
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">
+ <original-package android:name="com.cyanogenmod.account" />
+
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.STATUS_BAR" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
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