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

Commit f7f46dda authored by Costin Manolache's avatar Costin Manolache Committed by Android Git Automerger
Browse files

am b324911b: Merge "If \'customTokens\', let authenticator handle notification." into honeycomb

* commit 'b324911b':
  If 'customTokens', let authenticator handle notification.
parents 94243b0e b324911b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -195,6 +195,13 @@ public class AccountManager {
    public static final String KEY_CALLER_UID = "callerUid";
    public static final String KEY_CALLER_PID = "callerPid";

    /**
     * Boolean, if set and 'customTokens' the authenticator is responsible for
     * notifications.
     * @hide
     */
    public static final String KEY_NOTIFY_ON_FAILURE = "notifyOnAuthFailure";

    public static final String ACTION_AUTHENTICATOR_INTENT =
            "android.accounts.AccountAuthenticator";
    public static final String AUTHENTICATOR_META_DATA_NAME =
+4 −1
Original line number Diff line number Diff line
@@ -897,6 +897,9 @@ public class AccountManagerService
            // let authenticator know the identity of the caller
            loginOptions.putInt(AccountManager.KEY_CALLER_UID, callerUid);
            loginOptions.putInt(AccountManager.KEY_CALLER_PID, callerPid);
            if (notifyOnAuthFailure) {
                loginOptions.putBoolean(AccountManager.KEY_NOTIFY_ON_FAILURE, true);
            }
        }

        long identityToken = clearCallingIdentity();
@@ -964,7 +967,7 @@ public class AccountManagerService
                        }

                        Intent intent = result.getParcelable(AccountManager.KEY_INTENT);
                        if (intent != null && notifyOnAuthFailure) {
                        if (intent != null && notifyOnAuthFailure && !customTokens) {
                            doNotification(
                                    account, result.getString(AccountManager.KEY_AUTH_FAILED_MESSAGE),
                                    intent);