Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7da2987f authored by Dmitry Dementyev's avatar Dmitry Dementyev Committed by Android (Google) Code Review
Browse files

Merge "Update AccountManagerService checkKeyIntent." into main

parents 381b1608 fa25c428
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -3152,6 +3152,7 @@ public class AccountManagerService
                                    new AccountAuthenticatorResponse(this),
                                    authTokenType,
                                    true);
                            mCanStartAccountManagerActivity = true;
                            Bundle bundle = new Bundle();
                            bundle.putParcelable(AccountManager.KEY_INTENT, intent);
                            onResult(bundle);
@@ -4933,6 +4934,7 @@ public class AccountManagerService
        IAccountAuthenticator mAuthenticator = null;

        private final boolean mStripAuthTokenFromResult;
        protected boolean mCanStartAccountManagerActivity = false;
        protected final UserAccounts mAccounts;

        public Session(UserAccounts accounts, IAccountManagerResponse response, String accountType,
@@ -5068,9 +5070,13 @@ public class AccountManagerService

        private boolean isExportedSystemActivity(ActivityInfo activityInfo) {
            String className = activityInfo.name;
            return "android".equals(activityInfo.packageName) &&
                    (GrantCredentialsPermissionActivity.class.getName().equals(className)
                    || CantAddAccountActivity.class.getName().equals(className));
            if (!"android".equals(activityInfo.packageName)) {
                return false;

            }
            return (mCanStartAccountManagerActivity
                    && GrantCredentialsPermissionActivity.class.getName().equals(className))
                    || CantAddAccountActivity.class.getName().equals(className);
        }

        private void close() {