summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-03-12 13:50:19 -0700
committercretin45 <cretin45@gmail.com>2015-03-12 13:50:19 -0700
commit0ed67f547cf59b7aff7a58ab503c15e69c41c97c (patch)
treeb642444564a2ccb15a02e5b82d11197bb44d39f7
parentf66c56b62f03e0a090607043f2c28efae0589123 (diff)
downloadpackages_apps_SetupWizard-0ed67f547cf59b7aff7a58ab503c15e69c41c97c.zip
packages_apps_SetupWizard-0ed67f547cf59b7aff7a58ab503c15e69c41c97c.tar.gz
packages_apps_SetupWizard-0ed67f547cf59b7aff7a58ab503c15e69c41c97c.tar.bz2
SetupWizard: Only go through OOBE if owner
Change-Id: I3886119d0d6fd69f18ea23d4b6435da75280dbf8
-rw-r--r--src/com/cyanogenmod/setupwizard/SetupWizardApp.java3
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java13
2 files changed, 7 insertions, 9 deletions
diff --git a/src/com/cyanogenmod/setupwizard/SetupWizardApp.java b/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
index 52f1ead..549cb61 100644
--- a/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
+++ b/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
@@ -61,9 +61,10 @@ public class SetupWizardApp extends Application {
try {
// Since this is a new component, we need to disable here if the user
// has already been through setup on a previous version.
- if (SetupWizardUtils.isGuestUser(this)
+ if (!SetupWizardUtils.isOwner()
|| Settings.Secure.getInt(getContentResolver(),
Settings.Secure.USER_SETUP_COMPLETE) == 1) {
+ SetupWizardUtils.disableGMSSetupWizard(this);
SetupWizardUtils.disableSetupWizard(this);
} else {
disableCaptivePortalDetection();
diff --git a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java
index e6ee1de..bb5d846 100644
--- a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java
+++ b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java
@@ -23,7 +23,6 @@ import android.net.ConnectivityManager;
import android.telephony.TelephonyManager;
import com.android.internal.telephony.TelephonyIntents;
-import com.cyanogenmod.setupwizard.ui.SetupWizardActivity;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
import java.util.ArrayList;
@@ -47,7 +46,7 @@ public class CMSetupWizardData extends AbstractSetupData {
if (SetupWizardUtils.hasTelephony(mContext)) {
pages.add(new SimCardMissingPage(mContext, this).setHidden(isSimInserted()));
}
- if (SetupWizardUtils.isMultiSimDevice(mContext) && SetupWizardUtils.isOwner()) {
+ if (SetupWizardUtils.isMultiSimDevice(mContext)) {
pages.add(new ChooseDataSimPage(mContext, this).setHidden(!allSimsInserted()));
}
if (SetupWizardUtils.hasTelephony(mContext)) {
@@ -57,12 +56,10 @@ public class CMSetupWizardData extends AbstractSetupData {
if (SetupWizardUtils.hasGMS(mContext)) {
pages.add(new GmsAccountPage(mContext, this).setHidden(true));
}
- if (SetupWizardUtils.isOwner()) {
- pages.add(new CyanogenServicesPage(mContext, this).setHidden(true));
- pages.add(new CyanogenSettingsPage(mContext, this));
- pages.add(new OtherSettingsPage(mContext, this));
- pages.add(new DateTimePage(mContext, this));
- }
+ pages.add(new CyanogenServicesPage(mContext, this).setHidden(true));
+ pages.add(new CyanogenSettingsPage(mContext, this));
+ pages.add(new OtherSettingsPage(mContext, this));
+ pages.add(new DateTimePage(mContext, this));
pages.add(new FinishPage(mContext, this));
return new PageList(pages.toArray(new SetupPage[pages.size()]));
}