From 7afb086c7604bc17bc9af55d0e54e85078d6092e Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 10 Mar 2017 17:12:06 +0000 Subject: [PATCH] Debug activity: Show the number of entries per journal. --- .../java/com/etesync/syncadapter/ui/DebugInfoActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/etesync/syncadapter/ui/DebugInfoActivity.java b/app/src/main/java/com/etesync/syncadapter/ui/DebugInfoActivity.java index 306db17a..9cd1b414 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/DebugInfoActivity.java +++ b/app/src/main/java/com/etesync/syncadapter/ui/DebugInfoActivity.java @@ -46,6 +46,7 @@ import com.etesync.syncadapter.Constants; import com.etesync.syncadapter.InvalidAccountException; import com.etesync.syncadapter.R; import com.etesync.syncadapter.journalmanager.Exceptions.HttpException; +import com.etesync.syncadapter.model.EntryEntity; import com.etesync.syncadapter.model.JournalEntity; import com.etesync.syncadapter.model.ServiceDB; @@ -250,6 +251,8 @@ public class DebugInfoActivity extends AppCompatActivity implements LoaderManage List journals = data.select(JournalEntity.class).where(JournalEntity.DELETED.eq(false)).get().toList(); for (JournalEntity journal : journals) { report.append(journal.toString() + "\n"); + int entryCount = data.count(EntryEntity.class).where(EntryEntity.JOURNAL.eq(journal)).get().value(); + report.append("\tEntries: " + String.valueOf(entryCount) + "\n\n"); } report.append("\n");