am e8b1971c: Merge "allow null authtokens to invalidateAuthToken" into froyo

Merge commit 'e8b1971c7b09f14f2d9a2e12399294798cf2066a' into froyo-plus-aosp

* commit 'e8b1971c7b09f14f2d9a2e12399294798cf2066a':
  allow null authtokens to invalidateAuthToken
This commit is contained in:
Fred Quintana
2010-04-01 14:32:51 -07:00
committed by Android Git Automerger

View File

@ -539,14 +539,15 @@ public class AccountManager {
* {@link android.Manifest.permission#MANAGE_ACCOUNTS} or * {@link android.Manifest.permission#MANAGE_ACCOUNTS} or
* {@link android.Manifest.permission#USE_CREDENTIALS} * {@link android.Manifest.permission#USE_CREDENTIALS}
* *
* @param accountType The account type of 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 * @param authToken The auth token to invalidate, may be null
*/ */
public void invalidateAuthToken(final String accountType, final String authToken) { public void invalidateAuthToken(final String accountType, final String authToken) {
if (accountType == null) throw new IllegalArgumentException("accountType is null"); if (accountType == null) throw new IllegalArgumentException("accountType is null");
if (authToken == null) throw new IllegalArgumentException("authToken is null");
try { try {
if (authToken != null) {
mService.invalidateAuthToken(accountType, authToken); mService.invalidateAuthToken(accountType, authToken);
}
} catch (RemoteException e) { } catch (RemoteException e) {
// won't ever happen // won't ever happen
throw new RuntimeException(e); throw new RuntimeException(e);