- Common ways to obtain VAccountManagerService
private void myMethod () {VAccountManagerService v =
new VAccountManagerService()
AtomicReference atomicReference;atomicReference.get()
- Smart code suggestions by Codota
}
public void confirmCredentials(int userId, IAccountManagerResponse response, final Account account, final Bundle options, final boolean expectActivityLaunch) { if (response == null) throw new IllegalArgumentException("response is null"); if (account == null) throw new IllegalArgumentException("account is null"); AuthenticatorInfo info = getAuthenticatorInfo(account.type); if (info == null) { try { response.onError(ERROR_CODE_BAD_ARGUMENTS, "account.type does not exist"); } catch (RemoteException e) { e.printStackTrace(); } return; } new Session(response, userId, info, expectActivityLaunch, true, account.name, true, true) { @Override public void run() throws RemoteException { mAuthenticator.confirmCredentials(this, account, options); } }.bind(); }
if (account == null) throw new IllegalArgumentException("account is null"); if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null"); AuthenticatorInfo info = this.getAuthenticatorInfo(account.type); if (info == null) { try {
@Override public void editProperties(int userId, IAccountManagerResponse response, final String accountType, final boolean expectActivityLaunch) { if (response == null) throw new IllegalArgumentException("response is null"); if (accountType == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = this.getAuthenticatorInfo(accountType); if (info == null) { try { response.onError(ERROR_CODE_BAD_ARGUMENTS, "account.type does not exist"); } catch (RemoteException e) { e.printStackTrace(); } return; } new Session(response, userId, info, expectActivityLaunch, true, null) { @Override public void run() throws RemoteException { mAuthenticator.editProperties(this, mAuthenticatorInfo.desc.type); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", editProperties" + ", accountType " + accountType; } }.bind(); }
if (response == null) throw new IllegalArgumentException("response is null"); if (accountType == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = getAuthenticatorInfo(accountType); if (info == null) { try {
if (accountType == null) throw new IllegalArgumentException("accountType is null"); if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null"); AuthenticatorInfo info = getAuthenticatorInfo(accountType); if (info == null) { try {
if (account == null) throw new IllegalArgumentException("account is null"); if (features == null) throw new IllegalArgumentException("features is null"); AuthenticatorInfo info = this.getAuthenticatorInfo(account.type); if (info == null) { try {
if (response == null) throw new IllegalArgumentException("response is null"); if (account == null) throw new IllegalArgumentException("account is null"); AuthenticatorInfo info = this.getAuthenticatorInfo(account.type); if (info == null) { try {
@Override public void getAccountsByFeatures(int userId, IAccountManagerResponse response, String type, String[] features) { if (response == null) throw new IllegalArgumentException("response is null"); if (type == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = getAuthenticatorInfo(type); if (info == null) { Bundle bundle = new Bundle(); bundle.putParcelableArray(AccountManager.KEY_ACCOUNTS, new Account[0]); try { response.onResult(bundle); } catch (RemoteException e) { e.printStackTrace(); } return; } if (features == null || features.length == 0) { Bundle bundle = new Bundle(); bundle.putParcelableArray(AccountManager.KEY_ACCOUNTS, getAccounts(userId, type)); try { response.onResult(bundle); } catch (RemoteException e) { e.printStackTrace(); } } else { new GetAccountsByTypeAndFeatureSession(response, userId, info, features).bind(); } }
return; AuthenticatorInfo info = getAuthenticatorInfo(account.type); if (info == null) { try {
public void confirmCredentials(int userId, IAccountManagerResponse response, final Account account, final Bundle options, final boolean expectActivityLaunch) { if (response == null) throw new IllegalArgumentException("response is null"); if (account == null) throw new IllegalArgumentException("account is null"); AuthenticatorInfo info = getAuthenticatorInfo(account.type); if (info == null) { try { response.onError(ERROR_CODE_BAD_ARGUMENTS, "account.type does not exist"); } catch (RemoteException e) { e.printStackTrace(); } return; } new Session(response, userId, info, expectActivityLaunch, true, account.name, true, true) { @Override public void run() throws RemoteException { mAuthenticator.confirmCredentials(this, account, options); } }.bind(); }
public void confirmCredentials(int userId, IAccountManagerResponse response, final Account account, final Bundle options, final boolean expectActivityLaunch) { if (response == null) throw new IllegalArgumentException("response is null"); if (account == null) throw new IllegalArgumentException("account is null"); AuthenticatorInfo info = getAuthenticatorInfo(account.type); if (info == null) { try { response.onError(ERROR_CODE_BAD_ARGUMENTS, "account.type does not exist"); } catch (RemoteException e) { e.printStackTrace(); } return; } new Session(response, userId, info, expectActivityLaunch, true, account.name, true, true) { @Override public void run() throws RemoteException { mAuthenticator.confirmCredentials(this, account, options); } }.bind(); }
if (account == null) throw new IllegalArgumentException("account is null"); if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null"); AuthenticatorInfo info = this.getAuthenticatorInfo(account.type); if (info == null) { try {
@Override public void editProperties(int userId, IAccountManagerResponse response, final String accountType, final boolean expectActivityLaunch) { if (response == null) throw new IllegalArgumentException("response is null"); if (accountType == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = this.getAuthenticatorInfo(accountType); if (info == null) { try { response.onError(ERROR_CODE_BAD_ARGUMENTS, "account.type does not exist"); } catch (RemoteException e) { e.printStackTrace(); } return; } new Session(response, userId, info, expectActivityLaunch, true, null) { @Override public void run() throws RemoteException { mAuthenticator.editProperties(this, mAuthenticatorInfo.desc.type); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", editProperties" + ", accountType " + accountType; } }.bind(); }
if (account == null) throw new IllegalArgumentException("account is null"); if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null"); AuthenticatorInfo info = this.getAuthenticatorInfo(account.type); if (info == null) { try {
@Override public void editProperties(int userId, IAccountManagerResponse response, final String accountType, final boolean expectActivityLaunch) { if (response == null) throw new IllegalArgumentException("response is null"); if (accountType == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = this.getAuthenticatorInfo(accountType); if (info == null) { try { response.onError(ERROR_CODE_BAD_ARGUMENTS, "account.type does not exist"); } catch (RemoteException e) { e.printStackTrace(); } return; } new Session(response, userId, info, expectActivityLaunch, true, null) { @Override public void run() throws RemoteException { mAuthenticator.editProperties(this, mAuthenticatorInfo.desc.type); } @Override protected String toDebugString(long now) { return super.toDebugString(now) + ", editProperties" + ", accountType " + accountType; } }.bind(); }
if (accountType == null) throw new IllegalArgumentException("accountType is null"); if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null"); AuthenticatorInfo info = getAuthenticatorInfo(accountType); if (info == null) { try {
if (response == null) throw new IllegalArgumentException("response is null"); if (accountType == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = getAuthenticatorInfo(accountType); if (info == null) { try {
if (response == null) throw new IllegalArgumentException("response is null"); if (accountType == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = getAuthenticatorInfo(accountType); if (info == null) { try {
@Override public void getAccountsByFeatures(int userId, IAccountManagerResponse response, String type, String[] features) { if (response == null) throw new IllegalArgumentException("response is null"); if (type == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = getAuthenticatorInfo(type); if (info == null) { Bundle bundle = new Bundle(); bundle.putParcelableArray(AccountManager.KEY_ACCOUNTS, new Account[0]); try { response.onResult(bundle); } catch (RemoteException e) { e.printStackTrace(); } return; } if (features == null || features.length == 0) { Bundle bundle = new Bundle(); bundle.putParcelableArray(AccountManager.KEY_ACCOUNTS, getAccounts(userId, type)); try { response.onResult(bundle); } catch (RemoteException e) { e.printStackTrace(); } } else { new GetAccountsByTypeAndFeatureSession(response, userId, info, features).bind(); } }
@Override public void getAccountsByFeatures(int userId, IAccountManagerResponse response, String type, String[] features) { if (response == null) throw new IllegalArgumentException("response is null"); if (type == null) throw new IllegalArgumentException("accountType is null"); AuthenticatorInfo info = getAuthenticatorInfo(type); if (info == null) { Bundle bundle = new Bundle(); bundle.putParcelableArray(AccountManager.KEY_ACCOUNTS, new Account[0]); try { response.onResult(bundle); } catch (RemoteException e) { e.printStackTrace(); } return; } if (features == null || features.length == 0) { Bundle bundle = new Bundle(); bundle.putParcelableArray(AccountManager.KEY_ACCOUNTS, getAccounts(userId, type)); try { response.onResult(bundle); } catch (RemoteException e) { e.printStackTrace(); } } else { new GetAccountsByTypeAndFeatureSession(response, userId, info, features).bind(); } }