SetupWizard: Add seedvault restore page in GMS flow

Change-Id: I1ce86864b4a8d0477cd2db77a3820583e24c758a
This commit is contained in:
Michael Bestas
2020-11-18 15:43:33 +02:00
committed by Alessandro Astone
parent c61ad50de9
commit 7423d88cd0
3 changed files with 13 additions and 1 deletions

View File

@@ -266,7 +266,6 @@
android:excludeFromRecents="true"
android:configChanges="mcc|mnc"
android:immersive="true"
android:exported="false"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="org.lineageos.setupwizard.LINEAGE_RESTORE_BACKUP"/>

View File

@@ -99,6 +99,9 @@
</WizardAction>
<WizardAction wizard:script="android.resource://com.google.android.setupwizard/xml/wizard_script_qr_provision_flow" id="qr_provision_flow" />
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SETTINGS;end" id="oem_post_setup">
<result wizard:action="restore" />
</WizardAction>
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_RESTORE_BACKUP;end" id="restore">
<result wizard:action="finish" />
</WizardAction>
<WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SETUP_COMPLETE;end" id="finish">

View File

@@ -17,7 +17,11 @@
package org.lineageos.setupwizard.backup;
import android.app.Activity;
import android.content.Intent;
import com.google.android.setupcompat.util.WizardManagerHelper;
import org.lineageos.setupwizard.R;
import org.lineageos.setupwizard.SubBaseActivity;
@@ -33,6 +37,12 @@ public class RestoreIntroActivity extends SubBaseActivity {
findViewById(R.id.intro_restore_button).setOnClickListener(v -> launchRestore());
}
@Override
protected void onNextPressed() {
Intent intent = WizardManagerHelper.getNextIntent(getIntent(), Activity.RESULT_OK);
nextAction(NEXT_REQUEST, intent);
}
@Override
protected int getLayoutResId() {
return R.layout.intro_restore_activity;