Revert "Fix strict mode violation in maybeStartExchangeServiceThread"
This reverts commit 0e1ffb033a2e2701e99e05d2f8abdfc62444faa9.
diff --git a/src/com/android/exchange/ExchangeService.java b/src/com/android/exchange/ExchangeService.java
index cfd1cf9..6f103b0 100644
--- a/src/com/android/exchange/ExchangeService.java
+++ b/src/com/android/exchange/ExchangeService.java
@@ -1785,29 +1785,16 @@
}
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();
- }
- }
- }
- });
}
/**