Skip to content

Commit 13a9d6f

Browse files
committed
Interleave native and non-native high priority sessions
1 parent 60dfced commit 13a9d6f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/persistence/CrashlyticsReportPersistence.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,10 @@ private void capFinalizedReports() {
244244
@NonNull
245245
private List<File> getAllFinalizedReportFiles() {
246246
return sortAndCombineReportFiles(
247-
getAllFilesInDirectory(priorityReportsDirectory),
248-
getAllFilesInDirectory(reportsDirectory),
249-
getAllFilesInDirectory(nativeReportsDirectory));
247+
combineReportFiles(
248+
getAllFilesInDirectory(priorityReportsDirectory),
249+
getAllFilesInDirectory(nativeReportsDirectory)),
250+
getAllFilesInDirectory(reportsDirectory));
250251
}
251252

252253
private File getSessionDirectoryById(String sessionId) {
@@ -309,6 +310,10 @@ private static List<File> sortAndCombineReportFiles(List<File>... reports) {
309310
Collections.sort(reportList, LATEST_SESSION_ID_FIRST_COMPARATOR);
310311
}
311312

313+
return combineReportFiles(reports);
314+
}
315+
316+
private static List<File> combineReportFiles(List<File>... reports) {
312317
final ArrayList<File> allReportsFiles = new ArrayList<>();
313318
int totalReports = 0;
314319
for (List<File> reportList : reports) {

0 commit comments

Comments
 (0)