From 13fe88f38d8273061bda469f306532df1dcad2ab Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 27 Oct 2010 17:13:53 -0700 Subject: [PATCH] Revert "Fix strict mode violation in maybeStartExchangeServiceThread" This reverts commit 0e1ffb033a2e2701e99e05d2f8abdfc62444faa9. --- src/com/android/exchange/ExchangeService.java | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/src/com/android/exchange/ExchangeService.java b/src/com/android/exchange/ExchangeService.java index cfd1cf912..6f103b0aa 100644 --- a/src/com/android/exchange/ExchangeService.java +++ b/src/com/android/exchange/ExchangeService.java @@ -1785,29 +1785,16 @@ public class ExchangeService extends Service implements Runnable { } void maybeStartExchangeServiceThread() { - synchronized (sSyncLock) { - // Start our thread... - // See if there are any EAS accounts; otherwise, just go away - if (sServiceThread != null || sServiceThread.isAlive()) { - return; + // Start our thread... + // See if there are any EAS accounts; otherwise, just go away + if (EmailContent.count(this, HostAuth.CONTENT_URI, WHERE_PROTOCOL_EAS, null) > 0) { + if (sServiceThread == null || !sServiceThread.isAlive()) { + log(sServiceThread == null ? "Starting thread..." : "Restarting thread..."); + sServiceThread = new Thread(this, "ExchangeService"); + INSTANCE = this; + sServiceThread.start(); } } - final ExchangeService service = this; - Utility.runAsync(new Runnable() { - @Override - public void run() { - synchronized (sSyncLock) { - if (EmailContent.count(service, HostAuth.CONTENT_URI, - WHERE_PROTOCOL_EAS, null) > 0) { - log(sServiceThread == null ? "Starting thread..." - : "Restarting thread..."); - sServiceThread = new Thread(this, "ExchangeService"); - INSTANCE = service; - sServiceThread.start(); - } - } - } - }); } /**