diff options
author | Fred Quintana <fredq@google.com> | 2010-04-01 11:36:00 -0700 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2010-04-01 14:26:32 -0700 |
commit | f35b68f2b926021bce407f092cfe3e8f52fa0794 (patch) | |
tree | d5fa9282de53a0e17c9bfed60bebb3b2d8257880 /core/java/android/accounts | |
parent | 3ce1648fce73496c6ea6a208e5d13141ff7f34e1 (diff) | |
download | frameworks_base-f35b68f2b926021bce407f092cfe3e8f52fa0794.zip frameworks_base-f35b68f2b926021bce407f092cfe3e8f52fa0794.tar.gz frameworks_base-f35b68f2b926021bce407f092cfe3e8f52fa0794.tar.bz2 |
allow null authtokens to invalidateAuthToken
Change-Id: I78e91ef2f43503e13386894851f0d781583a4943
http://b/issue?id=2561519
Diffstat (limited to 'core/java/android/accounts')
-rw-r--r-- | core/java/android/accounts/AccountManager.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java index 15c8856..b0adaec 100644 --- a/core/java/android/accounts/AccountManager.java +++ b/core/java/android/accounts/AccountManager.java @@ -539,14 +539,15 @@ public class AccountManager { * {@link android.Manifest.permission#MANAGE_ACCOUNTS} or * {@link android.Manifest.permission#USE_CREDENTIALS} * - * @param accountType The account type of the auth token to invalidate - * @param authToken The auth token to invalidate + * @param accountType The account type of the auth token to invalidate, must not be null + * @param authToken The auth token to invalidate, may be null */ public void invalidateAuthToken(final String accountType, final String authToken) { if (accountType == null) throw new IllegalArgumentException("accountType is null"); - if (authToken == null) throw new IllegalArgumentException("authToken is null"); try { - mService.invalidateAuthToken(accountType, authToken); + if (authToken != null) { + mService.invalidateAuthToken(accountType, authToken); + } } catch (RemoteException e) { // won't ever happen throw new RuntimeException(e); |