Merge "Prevent unnecessary database queries in ExchangeService"
This commit is contained in:
commit
dc8f1afeb6
@ -1795,8 +1795,8 @@ public class ExchangeService extends Service implements Runnable {
|
||||
void maybeStartExchangeServiceThread() {
|
||||
// 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()) {
|
||||
if (sServiceThread == null || !sServiceThread.isAlive()) {
|
||||
if (EmailContent.count(this, HostAuth.CONTENT_URI, WHERE_PROTOCOL_EAS, null) > 0) {
|
||||
log(sServiceThread == null ? "Starting thread..." : "Restarting thread...");
|
||||
sServiceThread = new Thread(this, "ExchangeService");
|
||||
INSTANCE = this;
|
||||
|
Loading…
Reference in New Issue
Block a user