summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-03-16 17:09:49 -0700
committerAdnan Begovic <adnan@cyngn.com>2016-03-16 19:21:33 -0700
commit744827989c78d85bb7874cefc606b39d8647c351 (patch)
treebd377508a14d3501b1c14d00ac17d29f8c67df80
parent0d83f7c0625c522bdf34b7a695892991f01e2f7c (diff)
downloadpackages_apps_SetupWizard-744827989c78d85bb7874cefc606b39d8647c351.zip
packages_apps_SetupWizard-744827989c78d85bb7874cefc606b39d8647c351.tar.gz
packages_apps_SetupWizard-744827989c78d85bb7874cefc606b39d8647c351.tar.bz2
SetupWizard: Adapt to new GMS tap & go expectations.
Googles SetupWizard expects a specific flow for the restoration process -- amend the intent for gms restore to abide. Change-Id: Idf4c3b813676c5456770627067a42697ab756bb0 TICKET: CYNGNOS-2233
-rw-r--r--src/com/cyanogenmod/setupwizard/SetupWizardApp.java2
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java11
2 files changed, 11 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/setupwizard/SetupWizardApp.java b/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
index cdcfcf8..9651f07 100644
--- a/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
+++ b/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
@@ -53,6 +53,8 @@ public class SetupWizardApp extends Application {
public static final String EXTRA_LOGIN_FOR_KILL_SWITCH = "authCks";
public static final String EXTRA_TITLE = "title";
public static final String EXTRA_DETAILS = "details";
+ public static final String EXTRA_FRAGMENT = "fragment";
+ public static final String EXTRA_ACTION_ID = "actionId";
public static final String KEY_DETECT_CAPTIVE_PORTAL = "captive_portal_detection_enabled";
diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
index 2fc1243..7c33328 100644
--- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
@@ -28,6 +28,7 @@ import android.app.FragmentManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.PackageManager;
import android.database.ContentObserver;
import android.os.Bundle;
import android.os.Handler;
@@ -47,7 +48,11 @@ public class GmsAccountPage extends SetupPage {
public static final String TAG = "GmsAccountPage";
- public static final String ACTION_RESTORE = "com.google.android.setupwizard.RESTORE";
+ public static final String ACTION_PROGRESS = "com.google.android.setupwizard.PROGRESS";
+ public static final String RESTORE_ACTION_ID = "mfm_restore_start";
+ public static final String FRAGMENT_START_RESTORE =
+ "com.google.android.setupwizard.account.StartRestoreFragment";
+
private static final String RESTORE_WIZARD_SCRIPT =
"android.resource://com.google.android.setupwizard/xml/wizard_script";
@@ -176,7 +181,9 @@ public class GmsAccountPage extends SetupPage {
try {
// GMS can disable this after logging in sometimes
if (SetupWizardUtils.enableGMSSetupWizard(mContext)) {
- Intent intent = new Intent(ACTION_RESTORE);
+ Intent intent = new Intent(ACTION_PROGRESS);
+ intent.putExtra(SetupWizardApp.EXTRA_FRAGMENT, FRAGMENT_START_RESTORE);
+ intent.putExtra(SetupWizardApp.EXTRA_ACTION_ID, RESTORE_ACTION_ID);
intent.putExtra(SetupWizardApp.EXTRA_ALLOW_SKIP, true);
intent.putExtra(SetupWizardApp.EXTRA_USE_IMMERSIVE, true);
intent.putExtra(SetupWizardApp.EXTRA_FIRST_RUN, true);