@Implements(value=android.accounts.AccountManager.class) public class ShadowAccountManager extends Object
AccountManager.| Constructor and Description |
|---|
ShadowAccountManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccount(android.accounts.Account account)
Non-android accessor.
|
android.accounts.AccountManagerFuture<android.os.Bundle> |
addAccount(String accountType,
String authTokenType,
String[] requiredFeatures,
android.os.Bundle addAccountOptions,
android.app.Activity activity,
android.accounts.AccountManagerCallback<android.os.Bundle> callback,
android.os.Handler handler) |
boolean |
addAccountExplicitly(android.accounts.Account account,
String password,
android.os.Bundle userdata) |
void |
addAuthenticator(android.accounts.AuthenticatorDescription authenticator)
Non-android accessor.
|
void |
addAuthenticator(String type) |
void |
addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener listener,
android.os.Handler handler,
boolean updateImmediately) |
String |
blockingGetAuthToken(android.accounts.Account account,
String authTokenType,
boolean notifyAuthFailure) |
static android.accounts.AccountManager |
get(android.content.Context context) |
android.accounts.Account[] |
getAccounts() |
android.accounts.Account[] |
getAccountsByType(String type) |
android.accounts.AuthenticatorDescription[] |
getAuthenticatorTypes() |
android.os.Bundle |
getNextAddAccountOptions()
Non-Android accessor consumes and returns the next
addAccountOptions passed to addAccount. |
String |
getPassword(android.accounts.Account account) |
String |
getPreviousName(android.accounts.Account account) |
String |
getUserData(android.accounts.Account account,
String key) |
void |
invalidateAuthToken(String accountType,
String authToken) |
String |
peekAuthToken(android.accounts.Account account,
String tokenType) |
android.os.Bundle |
peekNextAddAccountOptions()
Non-Android accessor returns the next
addAccountOptions passed to addAccount without consuming it. |
android.accounts.AccountManagerFuture<Boolean> |
removeAccount(android.accounts.Account account,
android.accounts.AccountManagerCallback<Boolean> callback,
android.os.Handler handler) |
static void |
reset() |
void |
setAuthToken(android.accounts.Account account,
String tokenType,
String authToken) |
void |
setPassword(android.accounts.Account account,
String password) |
void |
setPreviousAccountName(android.accounts.Account account,
String previousName)
Non-android accessor.
|
void |
setUserData(android.accounts.Account account,
String key,
String value) |
@Resetter public static void reset()
@Implementation public static android.accounts.AccountManager get(android.content.Context context)
@Implementation public android.accounts.Account[] getAccounts()
@Implementation public android.accounts.Account[] getAccountsByType(String type)
@Implementation
public void setAuthToken(android.accounts.Account account,
String tokenType,
String authToken)
@Implementation public String peekAuthToken(android.accounts.Account account, String tokenType)
@Implementation
public boolean addAccountExplicitly(android.accounts.Account account,
String password,
android.os.Bundle userdata)
@Implementation public String blockingGetAuthToken(android.accounts.Account account, String authTokenType, boolean notifyAuthFailure)
@Implementation public android.accounts.AccountManagerFuture<Boolean> removeAccount(android.accounts.Account account, android.accounts.AccountManagerCallback<Boolean> callback, android.os.Handler handler)
@Implementation public android.accounts.AuthenticatorDescription[] getAuthenticatorTypes()
@Implementation
public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener listener,
android.os.Handler handler,
boolean updateImmediately)
@Implementation
public void setUserData(android.accounts.Account account,
String key,
String value)
@Implementation
public void setPassword(android.accounts.Account account,
String password)
@Implementation public String getPassword(android.accounts.Account account)
@Implementation public void invalidateAuthToken(String accountType, String authToken)
public void addAccount(android.accounts.Account account)
account - User account.public android.os.Bundle getNextAddAccountOptions()
addAccountOptions passed to addAccount.addAccountOptionspublic android.os.Bundle peekNextAddAccountOptions()
addAccountOptions passed to addAccount without consuming it.addAccountOptions@Implementation public android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(String accountType, String authTokenType, String[] requiredFeatures, android.os.Bundle addAccountOptions, android.app.Activity activity, android.accounts.AccountManagerCallback<android.os.Bundle> callback, android.os.Handler handler)
public void addAuthenticator(android.accounts.AuthenticatorDescription authenticator)
authenticator - System authenticator.public void addAuthenticator(String type)
public void setPreviousAccountName(android.accounts.Account account,
String previousName)
account - User account.previousName - Previous account name.@Implementation public String getPreviousName(android.accounts.Account account)
Copyright © 2016. All rights reserved.