|
|
@ -484,7 +484,7 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void disconnected(ConnectionEvent e) {
|
|
|
|
public void disconnected(ConnectionEvent e) {
|
|
|
|
Log.e(Helper.TAG, account.name + " disconnected");
|
|
|
|
Log.e(Helper.TAG, account.name + " disconnected event");
|
|
|
|
|
|
|
|
|
|
|
|
db.account().setAccountState(account.id, null);
|
|
|
|
db.account().setAccountState(account.id, null);
|
|
|
|
|
|
|
|
|
|
|
@ -503,7 +503,7 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void closed(ConnectionEvent e) {
|
|
|
|
public void closed(ConnectionEvent e) {
|
|
|
|
Log.e(Helper.TAG, account.name + " closed");
|
|
|
|
Log.e(Helper.TAG, account.name + " closed event");
|
|
|
|
|
|
|
|
|
|
|
|
db.account().setAccountState(account.id, null);
|
|
|
|
db.account().setAccountState(account.id, null);
|
|
|
|
|
|
|
|
|
|
|
@ -612,14 +612,12 @@ public class ServiceSynchronize extends LifecycleService {
|
|
|
|
db.account().setAccountError(account.id, Helper.formatThrowable(ex));
|
|
|
|
db.account().setAccountError(account.id, Helper.formatThrowable(ex));
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
Log.i(Helper.TAG, account.name + " closing");
|
|
|
|
Log.i(Helper.TAG, account.name + " closing");
|
|
|
|
if (istore != null) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
// This can take 20 seconds
|
|
|
|
// This can take 20 seconds
|
|
|
|
istore.close();
|
|
|
|
istore.close();
|
|
|
|
} catch (MessagingException ex) {
|
|
|
|
} catch (MessagingException ex) {
|
|
|
|
Log.w(Helper.TAG, account.name + " " + ex + "\n" + Log.getStackTraceString(ex));
|
|
|
|
Log.w(Helper.TAG, account.name + " " + ex + "\n" + Log.getStackTraceString(ex));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Log.i(Helper.TAG, account.name + " closed");
|
|
|
|
Log.i(Helper.TAG, account.name + " closed");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|