summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/setupwizard')
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java17
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/FinishSetupReceiver.java2
2 files changed, 6 insertions, 13 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java
index b4cba65..86cabd4 100644
--- a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java
+++ b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java
@@ -64,8 +64,9 @@ public class CMSetupWizardData extends AbstractSetupData {
pages.add(new MobileDataPage(mContext, this)
.setHidden(!isSimInserted() || mMobileDataEnabled));
}
- if (SetupWizardUtils.hasGMS(mContext)) {
- pages.add(new GmsAccountPage(mContext, this).setHidden(true));
+ final boolean hasGMS = SetupWizardUtils.hasGMS(mContext);
+ if (hasGMS) {
+ pages.add(new GmsAccountPage(mContext, this));
}
if (!SetupWizardUtils.hasLeanback(mContext) &&
SetupWizardUtils.isPackageInstalled(mContext,
@@ -76,7 +77,7 @@ public class CMSetupWizardData extends AbstractSetupData {
pages.add(new FingerprintSetupPage(mContext, this));
}
pages.add(new CyanogenSettingsPage(mContext, this));
- pages.add(new OtherSettingsPage(mContext, this));
+ pages.add(new OtherSettingsPage(mContext, this).setHidden(!hasGMS));
pages.add(new DateTimePage(mContext, this));
pages.add(new FinishPage(mContext, this));
return new PageList(pages.toArray(new SetupPage[pages.size()]));
@@ -111,16 +112,6 @@ public class CMSetupWizardData extends AbstractSetupData {
private void showHideAccountPages() {
boolean isConnected = SetupWizardUtils.isNetworkConnected(mContext);
- GmsAccountPage gmsAccountPage =
- (GmsAccountPage) getPage(GmsAccountPage.TAG);
- OtherSettingsPage otherSettingsPage = (OtherSettingsPage) getPage(OtherSettingsPage.TAG);
- if (gmsAccountPage != null) {
- boolean hidden = !isConnected && gmsAccountPage.canSkip();
- gmsAccountPage.setHidden(hidden);
- if (otherSettingsPage != null) {
- otherSettingsPage.setHidden(!hidden);
- }
- }
CyanogenServicesPage cyanogenServicesPage =
(CyanogenServicesPage) getPage(CyanogenServicesPage.TAG);
if (cyanogenServicesPage != null) {
diff --git a/src/com/cyanogenmod/setupwizard/setup/FinishSetupReceiver.java b/src/com/cyanogenmod/setupwizard/setup/FinishSetupReceiver.java
index d3db8ff..ee881a9 100644
--- a/src/com/cyanogenmod/setupwizard/setup/FinishSetupReceiver.java
+++ b/src/com/cyanogenmod/setupwizard/setup/FinishSetupReceiver.java
@@ -23,6 +23,8 @@ public class FinishSetupReceiver extends BroadcastReceiver {
StatusBarManager.DISABLE_NONE);
Settings.Global.putInt(context.getContentResolver(),
SetupWizardApp.KEY_DETECT_CAPTIVE_PORTAL, 1);
+ cyanogenmod.providers.CMSettings.Secure.putInt(context.getContentResolver(),
+ cyanogenmod.providers.CMSettings.Secure.CM_SETUP_WIZARD_COMPLETED, 1);
SetupWizardUtils.disableGMSSetupWizard(context);
SetupWizardUtils.disableSetupWizard(context);
}