From 8ebfc33d17989b43475d0e6ea0cbb427654a64e1 Mon Sep 17 00:00:00 2001 From: Matt Pape Date: Mon, 14 Dec 2020 17:49:03 +0000 Subject: [PATCH] Update AbstractAccountAuthenticator to call out the caveat in addAccount that requires synchronous execution. Bug: 175382142 Change-Id: I5c2032e91c47d8cd78e9d2c110737d8ad9ba2749 --- core/java/android/accounts/AbstractAccountAuthenticator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/java/android/accounts/AbstractAccountAuthenticator.java b/core/java/android/accounts/AbstractAccountAuthenticator.java index 6470a04aefd68..7b57442fb580e 100644 --- a/core/java/android/accounts/AbstractAccountAuthenticator.java +++ b/core/java/android/accounts/AbstractAccountAuthenticator.java @@ -93,7 +93,8 @@ import java.util.Arrays; * {@link AccountAuthenticatorResponse#onError} when it is complete. *
  • If the authenticator cannot synchronously process the request and return a result then it * may choose to return null and then use the AccountManagerResponse to send the result - * when it has completed the request. + * when it has completed the request. This asynchronous option is not available for the + * {@link #addAccount} method, which must complete synchronously. * *

    * The following descriptions of each of the abstract authenticator methods will not describe the @@ -101,7 +102,7 @@ import java.util.Arrays; * parameters and the expected result. *

    * When writing an activity to satisfy these requests one must pass in the AccountManagerResponse - * and return the result via that response when the activity finishes (or whenever else the + * and return the result via that response when the activity finishes (or whenever else the * activity author deems it is the correct time to respond). */ public abstract class AbstractAccountAuthenticator {