public synchronized void queryGmailLabels() {
// Get the account list, and pick the user specified address
AccountManager.get(mContext).getAccountsByTypeAndFeatures(ACCOUNT_TYPE_GOOGLE, FEATURES_MAIL,
new AccountManagerCallback<Account[]>() {
@Override
public void run(AccountManagerFuture<Account[]> future) {
Account[] accounts = null;
try {
accounts = future.getResult();
} catch (OperationCanceledException oce) {
Logs.e(TAG, "Got OperationCanceledException: "+oce.toString());
} catch (IOException ioe) {
Logs.e(TAG, "Got OperationCanceledException: "+ioe.toString());
} catch (AuthenticatorException ae) {
Logs.e(TAG, "Got OperationCanceledException: "+ae.toString());
}
mGmailUnreadCount = onAccountResults(accounts);
addGmailToContentList(mGmailUnreadCount);
Logs.d(TAG, "# Gmail unread count = "+ mGmailUnreadCount);
}
}, null /* handler */);
}
ContentManager.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:retrowatch
作者:
评论列表
文章目录