Merge "Fix multiple instances for Google SignIn activity appearing in task stack"

This commit is contained in:
TreeHugger Robot
2019-05-17 16:44:54 +00:00
committed by Android (Google) Code Review

View File

@@ -100,8 +100,9 @@ public class AddAccountSettings extends Activity {
addAccountOptions.putBoolean(EXTRA_HAS_MULTIPLE_USERS, addAccountOptions.putBoolean(EXTRA_HAS_MULTIPLE_USERS,
Utils.hasMultipleUsers(AddAccountSettings.this)); Utils.hasMultipleUsers(AddAccountSettings.this));
addAccountOptions.putParcelable(EXTRA_USER, mUserHandle); addAccountOptions.putParcelable(EXTRA_USER, mUserHandle);
intent.putExtras(addAccountOptions); intent.putExtras(addAccountOptions)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivityForResultAsUser(intent, ADD_ACCOUNT_REQUEST, mUserHandle); startActivityForResultAsUser(intent, ADD_ACCOUNT_REQUEST, mUserHandle);
} else { } else {
setResult(RESULT_OK); setResult(RESULT_OK);