Lines Matching refs:mailboxId
316 public void syncMailboxStatus(final long mailboxId, final int status,
321 cb.syncMailboxStatus(mailboxId, status, progress);
345 public void startSync(long mailboxId, boolean userRequest) throws RemoteException {
349 Mailbox m = Mailbox.restoreMailboxWithId(exchangeService, mailboxId);
367 sCallbackProxy.syncMailboxStatus(mailboxId, EmailServiceStatus.IN_PROGRESS,
369 sCallbackProxy.syncMailboxStatus(mailboxId,
383 cv, WHERE_MAILBOX_KEY, new String[] {Long.toString(mailboxId)});
385 exchangeService.mSyncErrorMap.remove(mailboxId);
392 sCallbackProxy.syncMailboxStatus(mailboxId, EmailServiceStatus.IN_PROGRESS, 0);
393 sCallbackProxy.syncMailboxStatus(mailboxId, EmailServiceStatus.SUCCESS, 0);
399 startManualSync(mailboxId, userRequest ? ExchangeService.SYNC_UI_REQUEST :
403 public void stopSync(long mailboxId) throws RemoteException {
404 stopManualSync(mailboxId);
422 for (long mailboxId: syncErrorMap.keySet()) {
423 SyncError error = syncErrorMap.get(mailboxId);
425 Mailbox m = Mailbox.restoreMailboxWithId(exchangeService, mailboxId);
429 syncErrorMap.remove(mailboxId);
1084 for (long mailboxId : mSyncErrorMap.keySet()) {
1085 Mailbox m = Mailbox.restoreMailboxWithId(this, mailboxId);
1087 log("Mailbox " + mailboxId + " no longer exists");
1089 SyncError error = mSyncErrorMap.get(mailboxId);
1129 for (long mailboxId: mSyncErrorMap.keySet()) {
1131 Mailbox m = Mailbox.restoreMailboxWithId(context, mailboxId);
1133 mSyncErrorMap.remove(mailboxId);
1138 SyncError error = mSyncErrorMap.get(mailboxId);
1140 mSyncErrorMap.remove(mailboxId);
1614 for (long mailboxId: mServiceMap.keySet()) {
1615 Mailbox m = Mailbox.restoreMailboxWithId(this, mailboxId);
1621 AbstractSyncService svc = mServiceMap.get(mailboxId);
1664 for (Long mailboxId : mServiceMap.keySet()) {
1665 toStop.add(mailboxId);
1669 for (Long mailboxId : toStop) {
1670 AbstractSyncService svc = mServiceMap.get(mailboxId);
1678 releaseWakeLock(mailboxId);
2038 * @param mailboxId the id of the mailbox to be released
2040 private void releaseMailbox(long mailboxId) {
2041 mServiceMap.remove(mailboxId);
2042 releaseWakeLock(mailboxId);
2166 for (long mailboxId: mServiceMap.keySet()) {
2167 Mailbox m = Mailbox.restoreMailboxWithId(this, mailboxId);
2169 deletedMailboxes.add(mailboxId);
2173 for (Long mailboxId: deletedMailboxes) {
2174 AbstractSyncService svc = mServiceMap.get(mailboxId);
2176 releaseMailbox(mailboxId);
2182 stopManualSync(mailboxId);
2185 releaseMailbox(mailboxId);
2206 long mailboxId = c.getLong(Mailbox.CONTENT_ID_COLUMN);
2209 service = mServiceMap.get(mailboxId);
2223 SyncError syncError = mSyncErrorMap.get(mailboxId);
2277 releaseMailbox(mailboxId);
2308 static public void serviceRequest(long mailboxId, int reason) {
2309 serviceRequest(mailboxId, 5*SECONDS, reason);
2321 static public void serviceRequest(long mailboxId, long ms, int reason) {
2324 Mailbox m = Mailbox.restoreMailboxWithId(exchangeService, mailboxId);
2327 AbstractSyncService service = exchangeService.mServiceMap.get(mailboxId);
2332 startManualSync(mailboxId, reason, null);
2339 static public void serviceRequestImmediate(long mailboxId) {
2342 AbstractSyncService service = exchangeService.mServiceMap.get(mailboxId);
2345 Mailbox m = Mailbox.restoreMailboxWithId(exchangeService, mailboxId);
2361 long mailboxId = msg.mMailboxKey;
2362 AbstractSyncService service = exchangeService.mServiceMap.get(mailboxId);
2365 startManualSync(mailboxId, SYNC_SERVICE_PART_REQUEST, req);
2376 * @param mailboxId
2379 static public int pingStatus(long mailboxId) {
2383 if (exchangeService.mServiceMap.get(mailboxId) != null) {
2387 SyncError error = exchangeService.mSyncErrorMap.get(mailboxId);
2398 static public void startManualSync(long mailboxId, int reason, Request req) {
2402 AbstractSyncService svc = exchangeService.mServiceMap.get(mailboxId);
2404 exchangeService.mSyncErrorMap.remove(mailboxId);
2405 Mailbox m = Mailbox.restoreMailboxWithId(exchangeService, mailboxId);
2420 static public void stopManualSync(long mailboxId) {
2424 AbstractSyncService svc = exchangeService.mServiceMap.get(mailboxId);
2429 exchangeService.releaseWakeLock(mailboxId);
2467 * @param mailboxId the id of the mailbox
2469 static public void removeFromSyncErrorMap(long mailboxId) {
2472 exchangeService.mSyncErrorMap.remove(mailboxId);
2476 private boolean isRunningInServiceThread(long mailboxId) {
2477 AbstractSyncService syncService = mServiceMap.get(mailboxId);
2493 long mailboxId = svc.mMailboxId;
2495 if (!exchangeService.isRunningInServiceThread(mailboxId)) {
2498 exchangeService.releaseMailbox(mailboxId);
2501 SyncError syncError = errorMap.get(mailboxId);
2504 Mailbox m = Mailbox.restoreMailboxWithId(exchangeService, mailboxId);
2522 errorMap.remove(mailboxId);
2534 errorMap.put(mailboxId, exchangeService.new SyncError(exitStatus, false));
2545 errorMap.put(mailboxId, exchangeService.new SyncError(exitStatus, true));