当前位置: 首页>>代码示例>>Java>>正文


Java IAccountManagerResponse.onResult方法代码示例

本文整理汇总了Java中android.accounts.IAccountManagerResponse.onResult方法的典型用法代码示例。如果您正苦于以下问题:Java IAccountManagerResponse.onResult方法的具体用法?Java IAccountManagerResponse.onResult怎么用?Java IAccountManagerResponse.onResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.accounts.IAccountManagerResponse的用法示例。


在下文中一共展示了IAccountManagerResponse.onResult方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sendResult

import android.accounts.IAccountManagerResponse; //导入方法依赖的package包/类
public void sendResult() {
    IAccountManagerResponse response = getResponseAndClose();
    if (response != null) {
        try {
            Account[] accounts = new Account[mAccountsWithFeatures.size()];
            for (int i = 0; i < accounts.length; i++) {
                accounts[i] = mAccountsWithFeatures.get(i);
            }
            if (Log.isLoggable(TAG, Log.VERBOSE)) {
                Log.v(TAG, getClass().getSimpleName() + " calling onResult() on response "
                        + response);
            }
            Bundle result = new Bundle();
            result.putParcelableArray(AccountManager.KEY_ACCOUNTS, accounts);
            response.onResult(result);
        } catch (RemoteException e) {
            // if the caller is dead then there is no one to care about remote exceptions
            Log.v(TAG, "failure while notifying response", e);
        }
    }
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:22,代码来源:VAccountManagerService.java

示例2: sendResult

import android.accounts.IAccountManagerResponse; //导入方法依赖的package包/类
public void sendResult() {
	IAccountManagerResponse response = getResponseAndClose();
	if (response != null) {
		try {
			Account[] accounts = new Account[mAccountsWithFeatures.size()];
			for (int i = 0; i < accounts.length; i++) {
				accounts[i] = mAccountsWithFeatures.get(i);
			}
			if (Log.isLoggable(TAG, Log.VERBOSE)) {
				Log.v(TAG, getClass().getSimpleName() + " calling onResult() on response "
						+ response);
			}
			Bundle result = new Bundle();
			result.putParcelableArray(AccountManager.KEY_ACCOUNTS, accounts);
			response.onResult(result);
		} catch (RemoteException e) {
			// if the caller is dead then there is no one to care about remote exceptions
			Log.v(TAG, "failure while notifying response", e);
		}
	}
}
 
开发者ID:codehz,项目名称:container,代码行数:22,代码来源:VAccountManagerService.java

示例3: renameAccount

import android.accounts.IAccountManagerResponse; //导入方法依赖的package包/类
@Override
public void renameAccount(int userId, IAccountManagerResponse response, Account accountToRename, String newName) {
	if (accountToRename == null) throw new IllegalArgumentException("account is null");
	Account resultingAccount = renameAccountInternal(userId, accountToRename, newName);
	Bundle result = new Bundle();
	result.putString(AccountManager.KEY_ACCOUNT_NAME, resultingAccount.name);
	result.putString(AccountManager.KEY_ACCOUNT_TYPE, resultingAccount.type);
	try {
		response.onResult(result);
	} catch (RemoteException e) {
		Log.w(TAG, e.getMessage());
	}
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:14,代码来源:VAccountManagerService.java

示例4: onResult

import android.accounts.IAccountManagerResponse; //导入方法依赖的package包/类
private void onResult(IAccountManagerResponse response, Bundle result) {
	try {
		response.onResult(result);
	} catch (RemoteException e) {
		// if the caller is dead then there is no one to care about remote
		// exceptions
		e.printStackTrace();
	}
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:10,代码来源:VAccountManagerService.java

示例5: renameAccount

import android.accounts.IAccountManagerResponse; //导入方法依赖的package包/类
@Override
public void renameAccount(int userId, IAccountManagerResponse response, Account accountToRename, String newName) {
    if (accountToRename == null) throw new IllegalArgumentException("account is null");
    Account resultingAccount = renameAccountInternal(userId, accountToRename, newName);
    Bundle result = new Bundle();
    result.putString(AccountManager.KEY_ACCOUNT_NAME, resultingAccount.name);
    result.putString(AccountManager.KEY_ACCOUNT_TYPE, resultingAccount.type);
    try {
        response.onResult(result);
    } catch (RemoteException e) {
        Log.w(TAG, e.getMessage());
    }
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:14,代码来源:VAccountManagerService.java

示例6: onResult

import android.accounts.IAccountManagerResponse; //导入方法依赖的package包/类
private void onResult(IAccountManagerResponse response, Bundle result) {
    try {
        response.onResult(result);
    } catch (RemoteException e) {
        // if the caller is dead then there is no one to care about remote
        // exceptions
        e.printStackTrace();
    }
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:10,代码来源:VAccountManagerService.java


注:本文中的android.accounts.IAccountManagerResponse.onResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。