Home | History | Annotate | Download | only in email

Lines Matching refs:accountId

124      * @param accountId The id of the account this notification is being built for.
135 private NotificationCompat.Builder createBaseAccountNotificationBuilder(long accountId,
158 Account account = Account.restoreAccountWithId(mContext, accountId);
168 * @param accountId The account id this notification is being built for.
175 private void showNotification(long accountId, String ticker, String title,
177 final NotificationCompat.Builder builder = createBaseAccountNotificationBuilder(accountId,
249 for (final Long accountId : sRefreshAccountSet) {
250 refreshNotificationsForAccountInternal(context, accountId);
263 * @param accountId The ID of the account to register the observer for. May be
267 private void registerMessageNotification(final long accountId) {
269 if (accountId == Account.ACCOUNT_ID_COMBINED_VIEW) {
282 ContentObserver obs = mNotificationMap.get(accountId);
284 LogUtils.i(LOG_TAG, "Registering for notifications for account " + accountId);
286 sNotificationHandler, mContext, accountId);
288 mNotificationMap.put(accountId, observer);
299 * @param accountId The ID of the account to unregister from. To unregister all accounts that
302 private void unregisterMessageNotification(final long accountId) {
304 if (accountId == Account.ACCOUNT_ID_COMBINED_VIEW) {
312 LogUtils.i(LOG_TAG, "Unregistering notifications for account " + accountId);
313 ContentObserver observer = mNotificationMap.remove(accountId);
409 private static int getLoginFailedNotificationId(long accountId) {
410 return NOTIFICATION_ID_BASE_LOGIN_WARNING + (int)accountId;
418 public void showLoginFailedNotification(long accountId) {
419 showLoginFailedNotification(accountId, null);
422 public void showLoginFailedNotification(long accountId, String reason) {
423 final Account account = Account.restoreAccountWithId(mContext, accountId);
432 AccountSettings.createAccountSettingsIntent(accountId,
433 account.mDisplayName, reason), getLoginFailedNotificationId(accountId));
439 public void cancelLoginFailedNotification(long accountId) {
440 mNotificationManager.cancel(getLoginFailedNotificationId(accountId));
449 public void showPasswordExpiringNotification(long accountId) {
450 Account account = Account.restoreAccountWithId(mContext, accountId);
454 accountId, false);
459 showNotification(accountId, ticker, title, accountName, intent,
469 public void showPasswordExpiredNotification(long accountId) {
470 Account account = Account.restoreAccountWithId(mContext, accountId);
474 accountId, true);
478 showNotification(accountId, ticker, title, accountName, intent,
578 final long accountId) {
581 sRefreshAccountSet.add(accountId);
588 refreshNotificationsForAccountInternal(context, accountId);
594 final long accountId) {
598 EmailProvider.uiUri("uiaccount", accountId), UIProvider.ACCOUNTS_PROJECTION,
602 LogUtils.e(LOG_TAG, "Null account cursor for account id %d", accountId);
617 accountId);
622 ContentUris.withAppendedId(EmailContent.MAILBOX_NOTIFICATION_URI, accountId),
641 accountId, mailboxId);
651 accountId, mailboxId);
697 final Handler handler, final Context context, final long accountId) {
700 mAccountId = accountId;
734 long accountId = c.getLong(EmailContent.ID_PROJECTION_COLUMN);
735 newAccountList.add(accountId);
743 for (final long accountId : sInstance.mNotificationMap.keySet()) {
744 if (!newAccountList.remove(accountId)) {
746 removedAccountList.add(accountId);
750 for (final long accountId : newAccountList) {
751 sInstance.registerMessageNotification(accountId);
754 for (final long accountId : removedAccountList) {
755 sInstance.unregisterMessageNotification(accountId);