Adds Google account login during private space setup
This has the following changes: 1. On profile creation starts intent to add google account to the private profile for Pixel only devices. 2. On accout sign in failed show an error screen with message to try again. 3. Moves the lock setup fragment from private to main user which now calls the helper Activity as a private user which helps to setup lock. This activity can now also be called from the planned Secondary Auth settings page to set up private profile lock. 4. On set up complete use SHOW_WORK_APPS intent as a workaroud to start launcher. Bug: 308397617 Test: Manual setup Change-Id: I19b95375409f015b2a5d30fdad766c2f6baa634b
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
|
||||
package com.android.settings.privatespace;
|
||||
|
||||
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.SET_LOCK_ACTION;
|
||||
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.ACCOUNT_LOGIN_ACTION;
|
||||
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.EXTRA_ACTION_TYPE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
@@ -134,7 +135,8 @@ public class AutoAdvanceSetupFragment extends Fragment {
|
||||
private void startActivityInPrivateUser(UserHandle userHandle) {
|
||||
/* Start new activity in private profile which is needed to set private profile lock */
|
||||
Intent intent = new Intent(getContext(), PrivateProfileContextHelperActivity.class);
|
||||
getActivity().startActivityForResultAsUser(intent, SET_LOCK_ACTION, userHandle);
|
||||
intent.putExtra(EXTRA_ACTION_TYPE, ACCOUNT_LOGIN_ACTION);
|
||||
getActivity().startActivityForResultAsUser(intent, ACCOUNT_LOGIN_ACTION, userHandle);
|
||||
}
|
||||
|
||||
private void showPrivateSpaceErrorScreen() {
|
||||
|
||||
Reference in New Issue
Block a user