Lines Matching refs:accountId
127 * @param accountId the account whose pending mail should be sent
129 public static void actionSendPendingMail(Context context, long accountId) {
133 i.putExtra(MailService.EXTRA_ACCOUNT, accountId);
151 final long accountId = intent.getLongExtra(EXTRA_ACCOUNT, -1);
171 Log.d(LOG_TAG, "action: check mail for id=" + accountId);
173 if (accountId >= 0) {
174 setWatchdog(accountId, alarmManager);
179 if (accountId != -1 && ContentResolver.getMasterSyncAutomatically()) {
182 if (report.accountId == accountId) {
184 syncStarted = syncOneAccount(mController, accountId,
196 if (accountId != -1) {
197 updateAccountReport(accountId, 0);
225 long accountId = c.getLong(Account.ID_PROJECTION_COLUMN);
226 if ("eas".equals(Account.getProtocol(mContext, accountId))) {
228 Log.d(LOG_TAG, "Deleting EAS account: " + accountId);
229 mController.deleteAccountSync(accountId, mContext);
246 mController.sendPendingMessages(accountId);
307 AccountSyncReport oldReport = oldSyncReports.get(newReport.accountId);
327 long[] accountInfo = new long[numAccounts * 2]; // pairs of { accountId, lastSync }
351 accountInfo[accountInfoIndex++] = report.accountId;
361 long idToCheck = (nextAccount == null) ? -1 : nextAccount.accountId;
383 * @param accountId the account we were trying to check
386 private void setWatchdog(long accountId, AlarmManager alarmMgr) {
387 PendingIntent pi = createAlarmIntent(accountId, null, true);
437 long accountId;
458 return "id=" + accountId + " prevSync=" + prevSyncTime + " nextSync=" + nextSyncTime;
466 * @param accountId -1 will rebuild the list if empty. other values will force loading
469 private void setupSyncReports(long accountId) {
471 setupSyncReportsLocked(accountId, mContext);
479 void setupSyncReportsLocked(long accountId, Context context) {
481 if (accountId == SYNC_REPORTS_RESET) {
484 accountId = SYNC_REPORTS_ALL_ACCOUNTS_IF_EMPTY;
485 } else if (accountId == SYNC_REPORTS_ALL_ACCOUNTS_IF_EMPTY) {
492 if (mSyncReports.containsKey(accountId)) {
499 if (accountId == SYNC_REPORTS_ALL_ACCOUNTS_IF_EMPTY) {
502 uri = ContentUris.withAppendedId(Account.CONTENT_URI, accountId);
536 report.accountId = account.mId;
550 mSyncReports.put(report.accountId, report);
560 * @param accountId the account being updated
564 private AccountSyncReport updateAccountReport(long accountId, int newCount) {
566 setupSyncReports(accountId);
568 AccountSyncReport report = mSyncReports.get(accountId);
571 Log.d(LOG_TAG, "No account to update for id=" + Long.toString(accountId));
604 long accountId = accountInfo[accountInfoIndex++];
606 AccountSyncReport report = mSyncReports.get(accountId);
619 public void updateMailboxCallback(MessagingException result, long accountId,
623 //checkAuthenticationStatus(result, accountId);
627 accountId, Mailbox.TYPE_INBOX);
630 updateAccountReport(accountId, numNewMessages);
632 updateAccountReport(accountId, -1);
639 public void serviceCheckMailCallback(MessagingException result, long accountId,
645 updateAccountReport(accountId, -1);
671 long accountId = c.getLong(Account.CONTENT_ID_COLUMN);
672 String protocol = Account.getProtocol(context, accountId);
674 Account account = Account.restoreAccountWithId(context, accountId);