ACRA analyzer enhanced

This commit is contained in:
serso 2014-09-20 11:35:21 +02:00
parent 8a372e09de
commit ad915be120

View File

@ -102,6 +102,7 @@ public final class AcraAnalyzer {
final AcraReport report = getFirstCollectionElement(sortedReport); final AcraReport report = getFirstCollectionElement(sortedReport);
outIs.println("Count: " + sortedReport.size()); outIs.println("Count: " + sortedReport.size());
outIs.println("App version: " + report.appVersion); outIs.println("App version: " + report.appVersion);
outIs.println("Android: " + getAndroidVersions(sortedReport));
outIs.println("Stack trace: " + report.stackTrace); outIs.println("Stack trace: " + report.stackTrace);
} }
} else { } else {
@ -110,6 +111,15 @@ public final class AcraAnalyzer {
} }
} }
@Nonnull
private static String getAndroidVersions(@Nonnull Collection<AcraReport> reports) {
final Set<String> versions = new HashSet<String>();
for (AcraReport report : reports) {
versions.add(report.androidVersion);
}
return versions.toString();
}
private static void scanMbox(@Nonnull String filename, @Nonnull Map<String, List<AcraReport>> reports, @Nullable String version) { private static void scanMbox(@Nonnull String filename, @Nonnull Map<String, List<AcraReport>> reports, @Nullable String version) {
final File file = new File(filename); final File file = new File(filename);
if (!file.isDirectory()) { if (!file.isDirectory()) {