Lines Matching refs:accountId
131 private NotificationCompat.Builder createBaseAccountNotificationBuilder(long accountId, in createBaseAccountNotificationBuilder() argument
153 Account account = Account.restoreAccountWithId(mContext, accountId); in createBaseAccountNotificationBuilder()
170 private void showNotification(long accountId, String ticker, String title, in showNotification() argument
172 final NotificationCompat.Builder builder = createBaseAccountNotificationBuilder(accountId, in showNotification()
245 for (final Long accountId : sRefreshAccountSet) { in ensureHandlerExists()
246 refreshNotificationsForAccountInternal(context, accountId); in ensureHandlerExists()
263 private void registerMessageNotification(final long accountId) { in registerMessageNotification() argument
265 if (accountId == Account.ACCOUNT_ID_COMBINED_VIEW) { in registerMessageNotification()
278 ContentObserver obs = mNotificationMap.get(accountId); in registerMessageNotification()
280 LogUtils.i(LOG_TAG, "Registering for notifications for account " + accountId); in registerMessageNotification()
282 sNotificationHandler, mContext, accountId); in registerMessageNotification()
284 mNotificationMap.put(accountId, observer); in registerMessageNotification()
298 private void unregisterMessageNotification(final long accountId) { in unregisterMessageNotification() argument
300 if (accountId == Account.ACCOUNT_ID_COMBINED_VIEW) { in unregisterMessageNotification()
308 LogUtils.i(LOG_TAG, "Unregistering notifications for account " + accountId); in unregisterMessageNotification()
309 ContentObserver observer = mNotificationMap.remove(accountId); in unregisterMessageNotification()
406 private static int getLoginFailedNotificationId(long accountId) { in getLoginFailedNotificationId() argument
407 return NOTIFICATION_ID_BASE_LOGIN_WARNING + (int)accountId; in getLoginFailedNotificationId()
416 public void showLoginFailedNotificationSynchronous(long accountId, boolean incoming) { in showLoginFailedNotificationSynchronous() argument
417 final Account account = Account.restoreAccountWithId(mContext, accountId); in showLoginFailedNotificationSynchronous()
419 final Mailbox mailbox = Mailbox.restoreMailboxOfType(mContext, accountId, in showLoginFailedNotificationSynchronous()
426 EmailProvider.getIncomingSettingsUri(accountId)); in showLoginFailedNotificationSynchronous()
429 HeadlessAccountSettingsLoader.getOutgoingSettingsUri(accountId)); in showLoginFailedNotificationSynchronous()
436 getLoginFailedNotificationId(accountId)); in showLoginFailedNotificationSynchronous()
443 public void cancelLoginFailedNotification(long accountId) { in cancelLoginFailedNotification() argument
444 mNotificationManager.cancel(getLoginFailedNotificationId(accountId)); in cancelLoginFailedNotification()
454 public void showPasswordExpiringNotificationSynchronous(long accountId) { in showPasswordExpiringNotificationSynchronous() argument
455 final Account account = Account.restoreAccountWithId(mContext, accountId); in showPasswordExpiringNotificationSynchronous()
459 accountId, false); in showPasswordExpiringNotificationSynchronous()
464 showNotification(accountId, ticker, title, accountName, intent, in showPasswordExpiringNotificationSynchronous()
475 public void showPasswordExpiredNotificationSynchronous(long accountId) { in showPasswordExpiredNotificationSynchronous() argument
476 final Account account = Account.restoreAccountWithId(mContext, accountId); in showPasswordExpiredNotificationSynchronous()
480 accountId, true); in showPasswordExpiredNotificationSynchronous()
484 showNotification(accountId, ticker, title, accountName, intent, in showPasswordExpiredNotificationSynchronous()
594 final long accountId) { in refreshNotificationsForAccount() argument
597 sRefreshAccountSet.add(accountId); in refreshNotificationsForAccount()
604 refreshNotificationsForAccountInternal(context, accountId); in refreshNotificationsForAccount()
610 final long accountId) { in refreshNotificationsForAccountInternal() argument
611 final Uri accountUri = EmailProvider.uiUri("uiaccount", accountId); in refreshNotificationsForAccountInternal()
616 ContentUris.withAppendedId(EmailContent.MAILBOX_NOTIFICATION_URI, accountId), in refreshNotificationsForAccountInternal()
639 LogUtils.d(LOG_TAG, "Changes to account " + accountId + ", folder: " in refreshNotificationsForAccountInternal()
753 final Handler handler, final Context context, final long accountId) { in MessageContentObserver() argument
756 mAccountId = accountId; in MessageContentObserver()
790 long accountId = c.getLong(EmailContent.ID_PROJECTION_COLUMN); in onChange() local
791 newAccountList.add(accountId); in onChange()
799 for (final long accountId : sInstance.mNotificationMap.keySet()) { in onChange()
800 if (!newAccountList.remove(accountId)) { in onChange()
802 removedAccountList.add(accountId); in onChange()
806 for (final long accountId : newAccountList) { in onChange()
807 sInstance.registerMessageNotification(accountId); in onChange()
810 for (final long accountId : removedAccountList) { in onChange()
811 sInstance.unregisterMessageNotification(accountId); in onChange()