From 0f45a283d1893ba0f944c4be588e247284ee58c0 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 19 Sep 2021 22:27:26 +0200 Subject: [PATCH] Prevent crash --- app/src/main/assets/CHANGELOG.md | 4 ++++ app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/assets/CHANGELOG.md b/app/src/main/assets/CHANGELOG.md index b9f204b8cb..d5aa0306aa 100644 --- a/app/src/main/assets/CHANGELOG.md +++ b/app/src/main/assets/CHANGELOG.md @@ -4,6 +4,10 @@ ### [Yaverlandia](https://en.wikipedia.org/wiki/Yaverlandia) +### 1.1729 + +* Added miscellaneous option to disable showing the changelog + ### 1.1728 * Prevent suggesting spam contacts diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 49edc0db44..55b3191922 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1853,10 +1853,12 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences }); for (TupleOperationEx.PartitionKey key : keys) { + int ops; synchronized (partitions) { + ops = partitions.get(key).size(); Log.i(folder.name + " queuing partition=" + key + - " operations=" + partitions.get(key).size()); + " operations=" + ops); } final long serial = state.getSerial(); @@ -1865,7 +1867,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences crumb.put("account", folder.account == null ? null : Long.toString(folder.account)); crumb.put("folder", folder.name + "/" + folder.type + ":" + folder.id); crumb.put("partition", key.toString()); - crumb.put("operations", Integer.toString(partitions.get(key).size())); + crumb.put("operations", Integer.toString(ops)); crumb.put("serial", Long.toString(serial)); Log.breadcrumb("Queuing", crumb);