Cancel processing

pull/185/head
M66B 4 years ago
parent dcf0499f0a
commit 130ef9d1e1

@ -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…
Cancel
Save