From 11ce4ee8077ea7b410a8635fd20a83bce9f25f29 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Fri, 9 Mar 2018 14:29:15 -0800 Subject: [PATCH] Actually increment event count --- .../thoughtcrime/securesms/backup/FullBackupExporter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/backup/FullBackupExporter.java b/src/org/thoughtcrime/securesms/backup/FullBackupExporter.java index c7a5882cc9..7c415932b9 100644 --- a/src/org/thoughtcrime/securesms/backup/FullBackupExporter.java +++ b/src/org/thoughtcrime/securesms/backup/FullBackupExporter.java @@ -85,13 +85,13 @@ public class FullBackupExporter extends FullBackupBase { } for (BackupProtos.SharedPreference preference : IdentityKeyUtil.getBackupRecord(context)) { - EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.PROGRESS, count)); + EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.PROGRESS, ++count)); outputStream.write(preference); } outputStream.writeEnd(); outputStream.close(); - EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.FINISHED, count)); + EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.FINISHED, ++count)); } private static List exportSchema(@NonNull SQLiteDatabase input, @NonNull BackupFrameOutputStream outputStream) @@ -133,7 +133,7 @@ public class FullBackupExporter extends FullBackupBase { try (Cursor cursor = input.rawQuery("SELECT * FROM " + table, null)) { while (cursor != null && cursor.moveToNext()) { - EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.PROGRESS, count)); + EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.PROGRESS, ++count)); if (predicate == null || predicate.test(cursor)) { StringBuilder statement = new StringBuilder(template);