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