Change to add temp GAIA education screen and swap account and lock flow
The change does below things: - Interchange account and lock setup in PS setup - After profile creation checks if network is present and starts new GAIA education screen If network is not present on device skips account login and shows lock setup screen. - Adds a temp GAIA education screen before starting of account login which can skip to lock setup or start account login Recording link : b/326389818#comment5 Screenshot : go/ss/7qWLUF4WDHFBQzi.png go/ss/A8EvoCFJwihaTQP.png Bug: 326389818 Test: Manual Change-Id: I91e3591c60aae22fc10058fb94dcb624573d2e37
This commit is contained in:
@@ -19,8 +19,6 @@ package com.android.settings.privatespace;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
@@ -61,23 +59,12 @@ public class PrivateSpaceSetupActivity extends FragmentActivity {
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
if (requestCode == SET_LOCK_ACTION && resultCode == RESULT_OK) {
|
||||
/* Start new activity in private profile to add an account to private profile */
|
||||
UserHandle userHandle =
|
||||
PrivateSpaceMaintainer.getInstance(this).getPrivateProfileHandle();
|
||||
if (userHandle != null) {
|
||||
Intent intent = new Intent(this, PrivateProfileContextHelperActivity.class);
|
||||
intent.putExtra(EXTRA_ACTION_TYPE, ACCOUNT_LOGIN_ACTION);
|
||||
mMetricsFeatureProvider.action(
|
||||
this, SettingsEnums.ACTION_PRIVATE_SPACE_SETUP_ACCOUNT_LOGIN_START);
|
||||
startActivityForResultAsUser(intent, ACCOUNT_LOGIN_ACTION, userHandle);
|
||||
} else {
|
||||
Log.w(TAG, "Private profile user handle is null");
|
||||
}
|
||||
mNavHostFragment.getNavController().navigate(R.id.action_success_fragment);
|
||||
} else if (requestCode == ACCOUNT_LOGIN_ACTION) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
mMetricsFeatureProvider.action(
|
||||
this, SettingsEnums.ACTION_PRIVATE_SPACE_SETUP_ACCOUNT_LOGIN_SUCCESS, true);
|
||||
mNavHostFragment.getNavController().navigate(R.id.action_success_fragment);
|
||||
mNavHostFragment.getNavController().navigate(R.id.action_account_lock_fragment);
|
||||
} else {
|
||||
mMetricsFeatureProvider.action(
|
||||
this,
|
||||
|
Reference in New Issue
Block a user