SetupWizard: Only show some pages if user is owner

Change-Id: Ib0e873d69fa38a2f214e0250eb8b1700011af369
This commit is contained in:
cretin45 2015-02-10 12:28:06 -08:00
parent 86837945e9
commit a6b56dd6f6

View File

@ -45,7 +45,7 @@ public class CMSetupWizardData extends AbstractSetupData {
if (SetupWizardUtils.hasTelephony(mContext)) { if (SetupWizardUtils.hasTelephony(mContext)) {
pages.add(new SimCardMissingPage(mContext, this).setHidden(isSimInserted())); 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())); pages.add(new ChooseDataSimPage(mContext, this).setHidden(!allSimsInserted()));
} }
if (SetupWizardUtils.hasTelephony(mContext)) { if (SetupWizardUtils.hasTelephony(mContext)) {
@ -55,10 +55,12 @@ public class CMSetupWizardData extends AbstractSetupData {
if (SetupWizardUtils.hasGMS(mContext)) { if (SetupWizardUtils.hasGMS(mContext)) {
pages.add(new GmsAccountPage(mContext, this)); pages.add(new GmsAccountPage(mContext, this));
} }
pages.add(new CyanogenServicesPage(mContext, this)); if (SetupWizardUtils.isOwner()) {
pages.add(new CyanogenSettingsPage(mContext, this)); pages.add(new CyanogenServicesPage(mContext, this));
pages.add(new OtherSettingsPage(mContext, this)); pages.add(new CyanogenSettingsPage(mContext, this));
pages.add(new DateTimePage(mContext, this)); pages.add(new OtherSettingsPage(mContext, this));
pages.add(new DateTimePage(mContext, this));
}
pages.add(new FinishPage(mContext, this)); pages.add(new FinishPage(mContext, this));
return new PageList(pages.toArray(new SetupPage[pages.size()])); return new PageList(pages.toArray(new SetupPage[pages.size()]));
} }