java类android.accounts.AccountAuthenticatorResponse的实例源码

Authenticator.java 文件源码 项目:LaravelNewsApp 阅读 25 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(
        AccountAuthenticatorResponse r,
        String s,
        String s2,
        String[] strings,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
Authenticator.java 文件源码 项目:LaravelNewsApp 阅读 26 收藏 0 点赞 0 评论 0
@Override
public Bundle confirmCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
Authenticator.java 文件源码 项目:LaravelNewsApp 阅读 30 收藏 0 点赞 0 评论 0
@Override
public Bundle getAuthToken(
        AccountAuthenticatorResponse r,
        Account account,
        String s,
        Bundle bundle) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}
Authenticator.java 文件源码 项目:LaravelNewsApp 阅读 23 收藏 0 点赞 0 评论 0
@Override
public Bundle updateCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        String s, Bundle bundle) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}
Authenticator.java 文件源码 项目:FBEventSync 阅读 28 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType,
                         String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException {
    final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
    intent.setAction(Intent.ACTION_VIEW);
    intent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, accountType);
    intent.putExtra(AuthenticatorActivity.ARG_AUTH_TOKEN_TYPE, authTokenType);
    intent.putExtra(AuthenticatorActivity.ARG_IS_ADDING_NEW_ACCOUNT, true);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);

    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}
Authenticator.java 文件源码 项目:FBEventSync 阅读 21 收藏 0 点赞 0 评论 0
@Override
public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account,
                          String[] features) throws NetworkErrorException {
    final Bundle result = new Bundle();
    result.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, false);
    return result;
}
AccountAuthenticatorService.java 文件源码 项目:PeSanKita-android 阅读 22 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
                         String[] requiredFeatures, Bundle options)
    throws NetworkErrorException
{
  return null;
}
ICalAuthenticator.java 文件源码 项目:EasyAppleSyncAdapter 阅读 23 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
                         String[] requiredFeatures, Bundle options) throws NetworkErrorException {
    final Intent intent = new Intent(context, loginActivity);
    intent.putExtra(GlobalConstant.ACCOUNT_TYPE, accountType);
    intent.putExtra(GlobalConstant.AUTH_TYPE, authTokenType);
    intent.putExtra(IS_ADDING_NEW_ACCOUNT, true);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}
PhonyAuthenticator.java 文件源码 项目:Phony-Android 阅读 21 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException {
    Log.d(TAG, "addAccount: called.");

    final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
    intent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, accountType);
    intent.putExtra(AuthenticatorActivity.ARG_IS_ADDING_NEW_ACCOUNT, true);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);

    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}
DummyAuthenticator.java 文件源码 项目:react-native-sync-adapter 阅读 23 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(
        AccountAuthenticatorResponse r,
        String s,
        String s2,
        String[] strings,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
DummyAuthenticator.java 文件源码 项目:react-native-sync-adapter 阅读 24 收藏 0 点赞 0 评论 0
@Override
public Bundle confirmCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
DummyAuthenticator.java 文件源码 项目:react-native-sync-adapter 阅读 23 收藏 0 点赞 0 评论 0
@Override
public Bundle getAuthToken(
        AccountAuthenticatorResponse r,
        Account account,
        String s,
        Bundle bundle) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}
SunshineAuthenticator.java 文件源码 项目:Udacity_Sunshine 阅读 84 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(
        AccountAuthenticatorResponse r,
        String s,
        String s2,
        String[] strings,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
SunshineAuthenticator.java 文件源码 项目:Udacity_Sunshine 阅读 24 收藏 0 点赞 0 评论 0
@Override
public Bundle confirmCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
Authenticator.java 文件源码 项目:FuelUp 阅读 23 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(
        AccountAuthenticatorResponse r,
        String s,
        String s2,
        String[] strings,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
Authenticator.java 文件源码 项目:FuelUp 阅读 22 收藏 0 点赞 0 评论 0
@Override
public Bundle confirmCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
Authenticator.java 文件源码 项目:FuelUp 阅读 22 收藏 0 点赞 0 评论 0
@Override
public Bundle getAuthToken(
        AccountAuthenticatorResponse r,
        Account account,
        String s,
        Bundle bundle) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}
ICalAuthenticator.java 文件源码 项目:EasyAppleSyncAdapter 阅读 21 收藏 0 点赞 0 评论 0
@Override
public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features)
        throws NetworkErrorException {
    final Bundle result = new Bundle();
    result.putBoolean(KEY_BOOLEAN_RESULT, false);
    return result;
}
ICalAuthenticator.java 文件源码 项目:EasyAppleSyncAdapter 阅读 28 收藏 0 点赞 0 评论 0
@Override
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType,
                           Bundle options) throws NetworkErrorException {
    final AccountManager am = AccountManager.get(context);
    String authToken = am.peekAuthToken(account, authTokenType);

    // get new token if there is no one
    if (TextUtils.isEmpty(authToken)) {
        String password = am.getPassword(account);
        if (password != null) {
            try {
                password = Crypto.armorDecrypt(password, context);
                authToken = serverHandler.userSignIn(account.name, password);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    // there is new token, return it
    if (!TextUtils.isEmpty(authToken)) {
        final Bundle result = new Bundle();
        result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
        result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);
        result.putString(AccountManager.KEY_AUTHTOKEN, authToken);
        return result;
    }

    // no token and no password, show login screen
    final Intent intent = new Intent(context, loginActivity);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    intent.putExtra(GlobalConstant.ACCOUNT_TYPE, account.type);
    intent.putExtra(GlobalConstant.ACCOUNT_NAME, account.name);
    intent.putExtra(IS_ADDING_NEW_ACCOUNT, false);
    final Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}
Authenticator.java 文件源码 项目:ChatExchange-old 阅读 25 收藏 0 点赞 0 评论 0
/**
 * Return a bundle with the information necessary to create a new account
 */
private Bundle newAccount(AccountAuthenticatorResponse response)
{
    Intent intent = new Intent(mContext, AuthenticatorActivity.class);
    intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
    Bundle bundle = new Bundle();
    bundle.putParcelable(AccountManager.KEY_INTENT, intent);
    return bundle;
}
Authenticator.java 文件源码 项目:ChatExchange-old 阅读 23 收藏 0 点赞 0 评论 0
@Override
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) throws NetworkErrorException
{
    AccountManager accountManager = AccountManager.get(mContext);
    String authToken = accountManager.peekAuthToken(account, authTokenType);
    if (!authToken.isEmpty())
    {
        Bundle bundle = new Bundle();
        bundle.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
        bundle.putString(AccountManager.KEY_AUTHTOKEN, authToken);
        return bundle;
    }
    return newAccount(response);
}
AccountAuthenticatorService.java 文件源码 项目:Cable-Android 阅读 22 收藏 0 点赞 0 评论 0
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType,
                         String[] requiredFeatures, Bundle options)
    throws NetworkErrorException
{
  return null;
}
StubAuthenticator.java 文件源码 项目:leoapp-sources 阅读 26 收藏 0 点赞 0 评论 0
@Override
public Bundle confirmCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
StubAuthenticator.java 文件源码 项目:leoapp-sources 阅读 21 收藏 0 点赞 0 评论 0
@Override
public Bundle getAuthToken(
        AccountAuthenticatorResponse r,
        Account account,
        String s,
        Bundle bundle) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}
StubAuthenticator.java 文件源码 项目:leoapp-sources 阅读 22 收藏 0 点赞 0 评论 0
@Override
public Bundle updateCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        String s,
        Bundle bundle) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}
TvGuideAuthenticator.java 文件源码 项目:TVGuide 阅读 20 收藏 0 点赞 0 评论 0
@Override
public Bundle confirmCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        Bundle bundle) throws NetworkErrorException {
    return null;
}
TvGuideAuthenticator.java 文件源码 项目:TVGuide 阅读 23 收藏 0 点赞 0 评论 0
@Override
public Bundle getAuthToken(
        AccountAuthenticatorResponse r,
        Account account,
        String s,
        Bundle bundle) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}
TvGuideAuthenticator.java 文件源码 项目:TVGuide 阅读 24 收藏 0 点赞 0 评论 0
@Override
public Bundle updateCredentials(
        AccountAuthenticatorResponse r,
        Account account,
        String s, Bundle bundle) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}
Authenticator.java 文件源码 项目:LaravelNewsApp 阅读 25 收藏 0 点赞 0 评论 0
@Override
public Bundle editProperties(
        AccountAuthenticatorResponse r, String s) {
    throw new UnsupportedOperationException();
}
Authenticator.java 文件源码 项目:LaravelNewsApp 阅读 23 收藏 0 点赞 0 评论 0
@Override
public Bundle hasFeatures(
        AccountAuthenticatorResponse r,
        Account account, String[] strings) throws NetworkErrorException {
    throw new UnsupportedOperationException();
}


问题


面经


文章

微信
公众号

扫码关注公众号