SetupWizard: Fix scenario where GMS setup disables its components

Change-Id: Ia8edd39645f83625ff06fb61903b672b774257d6
This commit is contained in:
cretin45
2015-02-17 17:09:32 -08:00
parent 77c129f8b9
commit 79840ecb4e
4 changed files with 131 additions and 40 deletions

View File

@@ -125,6 +125,7 @@ public class GmsAccountPage extends SetupPage {
}
} else if (requestCode == SetupWizardApp.REQUEST_CODE_RESTORE_GMS) {
handleResult(resultCode);
setHidden(true);
}
return true;
}
@@ -150,6 +151,8 @@ public class GmsAccountPage extends SetupPage {
private static void launchGmsRestorePage(final Activity activity) {
try {
// GMS can disable this after logging in sometimes
SetupWizardUtils.enableGMSSetupWizard(activity);
Intent intent = new Intent(ACTION_RESTORE);
intent.putExtra(SetupWizardApp.EXTRA_ALLOW_SKIP, true);
intent.putExtra(SetupWizardApp.EXTRA_USE_IMMERSIVE, true);
@@ -169,7 +172,7 @@ public class GmsAccountPage extends SetupPage {
e.printStackTrace();
// XXX: In open source, we don't know what gms version a user has.
// Bail if the restore activity is not found.
((SetupWizardActivity)activity).onNextPage();
((SetupWizardActivity) activity).onNextPage();
}
}