mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Cancel processing
This commit is contained in:
parent
dcf0499f0a
commit
130ef9d1e1
2 changed files with 4 additions and 1 deletions
|
@ -530,6 +530,8 @@ class Core {
|
|||
|
||||
if (ops.size() == 0)
|
||||
state.batchCompleted(folder.id, priority, sequence);
|
||||
else
|
||||
state.error(new OperationCanceledException("Processing"));
|
||||
} finally {
|
||||
Log.i(folder.name + " end process state=" + state + " pending=" + ops.size());
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import android.net.NetworkInfo;
|
|||
import android.net.NetworkRequest;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.OperationCanceledException;
|
||||
import android.os.PowerManager;
|
||||
import android.service.notification.StatusBarNotification;
|
||||
import android.text.TextUtils;
|
||||
|
@ -1355,7 +1356,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|||
ServiceSynchronize.this,
|
||||
folder.name + " " + Log.formatThrowable(ex, false));
|
||||
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
|
||||
state.error(ex);
|
||||
state.error(new OperationCanceledException("Process"));
|
||||
} finally {
|
||||
if (shouldClose) {
|
||||
if (ifolder != null && ifolder.isOpen()) {
|
||||
|
|
Loading…
Reference in a new issue