summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-05-13 15:34:56 -0700
committerEd Carrigan <cretin45@gmail.com>2016-05-13 15:40:51 -0700
commit36f15ef1691e93b23e7d73cd8da110256d69c7a0 (patch)
tree76ad361be3bad988394daaa121f2f440a4710662
parent44026d90072f6fdfe71eb65fcea23b2cb109229e (diff)
downloadpackages_apps_SetupWizard-36f15ef1691e93b23e7d73cd8da110256d69c7a0.zip
packages_apps_SetupWizard-36f15ef1691e93b23e7d73cd8da110256d69c7a0.tar.gz
packages_apps_SetupWizard-36f15ef1691e93b23e7d73cd8da110256d69c7a0.tar.bz2
SetupWizard: Alway show google pages if gms present
Helps with an issue where qsb widget doesn't work when running through oobe without network. Also set the cm setup finished setting for test receiver. CYNGNOS-2833 Change-Id: I83666deea5a27d74669691c4ab991b1b618edb0a
-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);
}