From a6b56dd6f67818f9254fd39a4ec0619b511a20c1 Mon Sep 17 00:00:00 2001 From: cretin45 Date: Tue, 10 Feb 2015 12:28:06 -0800 Subject: [PATCH] SetupWizard: Only show some pages if user is owner Change-Id: Ib0e873d69fa38a2f214e0250eb8b1700011af369 --- .../setupwizard/setup/CMSetupWizardData.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java index fd63459..7482762 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java +++ b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java @@ -45,7 +45,7 @@ public class CMSetupWizardData extends AbstractSetupData { if (SetupWizardUtils.hasTelephony(mContext)) { pages.add(new SimCardMissingPage(mContext, this).setHidden(isSimInserted())); } - if (SetupWizardUtils.isMultiSimDevice(mContext)) { + if (SetupWizardUtils.isMultiSimDevice(mContext) && SetupWizardUtils.isOwner()) { pages.add(new ChooseDataSimPage(mContext, this).setHidden(!allSimsInserted())); } if (SetupWizardUtils.hasTelephony(mContext)) { @@ -55,10 +55,12 @@ public class CMSetupWizardData extends AbstractSetupData { if (SetupWizardUtils.hasGMS(mContext)) { pages.add(new GmsAccountPage(mContext, this)); } - pages.add(new CyanogenServicesPage(mContext, this)); - pages.add(new CyanogenSettingsPage(mContext, this)); - pages.add(new OtherSettingsPage(mContext, this)); - pages.add(new DateTimePage(mContext, this)); + if (SetupWizardUtils.isOwner()) { + pages.add(new CyanogenServicesPage(mContext, this)); + 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()])); }