diff options
author | Danny Baumann <dannybaumann@web.de> | 2015-06-17 08:56:31 +0200 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2015-06-18 12:45:18 +0200 |
commit | 0ddd7f3ea98f20880398633ea10e51401696c28b (patch) | |
tree | 8d1d9cb510d0cfb82ea76aab47477d03bdbf45ed /provider_src/com/android/email/service/LegacyImapSyncAdapterService.java | |
parent | aa3af2e00fed06e1cd3b1ffaa1b1751565a3c937 (diff) | |
download | android_packages_apps_Email-0ddd7f3ea98f20880398633ea10e51401696c28b.tar.gz android_packages_apps_Email-0ddd7f3ea98f20880398633ea10e51401696c28b.tar.bz2 android_packages_apps_Email-0ddd7f3ea98f20880398633ea10e51401696c28b.zip |
Don't auto-register IDLE when gaining connection.
We request a sync in this case anyway, which in turn starts the IDLE
connection anyway. If we're starting IDLE earlier, we do unnecessary
work as the sync will tear it down just a few moments later.
Change-Id: I9b99023fbe1aaab72638f6ef9d29223d9a325b7b
Diffstat (limited to 'provider_src/com/android/email/service/LegacyImapSyncAdapterService.java')
-rw-r--r-- | provider_src/com/android/email/service/LegacyImapSyncAdapterService.java | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/provider_src/com/android/email/service/LegacyImapSyncAdapterService.java b/provider_src/com/android/email/service/LegacyImapSyncAdapterService.java index 1b5a36b61..2cb0e3743 100644 --- a/provider_src/com/android/email/service/LegacyImapSyncAdapterService.java +++ b/provider_src/com/android/email/service/LegacyImapSyncAdapterService.java @@ -18,9 +18,6 @@ package com.android.email.service; import static com.android.emailcommon.Logging.LOG_TAG; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - import android.content.AbstractThreadedSyncAdapter; import android.content.ComponentName; import android.content.ContentProviderClient; @@ -48,8 +45,6 @@ public class LegacyImapSyncAdapterService extends PopImapSyncAdapterService { // seconds for it to appear. If it takes longer than that, we will fail the sync. private static final long MAX_WAIT_FOR_SERVICE_MS = 10 * DateUtils.SECOND_IN_MILLIS; - private static final ExecutorService sExecutor = Executors.newCachedThreadPool(); - private IEmailService mImapService; private final ServiceConnection mConnection = new ServiceConnection() { @@ -61,15 +56,6 @@ public class LegacyImapSyncAdapterService extends PopImapSyncAdapterService { synchronized (mConnection) { mImapService = IEmailService.Stub.asInterface(binder); mConnection.notify(); - - // We need to run this task in the background (not in UI-Thread) - sExecutor.execute(new Runnable() { - @Override - public void run() { - final Context context = LegacyImapSyncAdapterService.this; - ImapService.registerAllImapIdleMailboxes(context, mImapService); - } - }); } } |