Check store connection if needed only

This commit is contained in:
M66B
2020-12-25 15:51:04 +01:00
parent eb2ebf0110
commit ebd9f09683
2 changed files with 9 additions and 6 deletions

View File

@@ -1568,11 +1568,13 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
new Exception(state.getUnrecoverable()));
// Sends store NOOP
EntityLog.log(this, account.name + " checking store" +
" memory=" + Log.getFreeMemMb() +
" battery=" + Helper.getBatteryLevel(this));
if (!iservice.getStore().isConnected())
throw new StoreClosedException(iservice.getStore(), "NOOP");
if (EmailService.SEPARATE_STORE_CONNECTION) {
EntityLog.log(this, account.name + " checking store" +
" memory=" + Log.getFreeMemMb() +
" battery=" + Helper.getBatteryLevel(this));
if (!iservice.getStore().isConnected())
throw new StoreClosedException(iservice.getStore(), "NOOP");
}
if (!getMainLooper().getThread().isAlive()) {
Log.e("App died");