Skip to content

Commit 3148b6c

Browse files
committed
clear fragmentSnapshotMap
1 parent 23a82a5 commit 3148b6c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

firebase-perf/src/main/java/com/google/firebase/perf/application/FrameMetricsRecorder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ public Optional<PerfFrameMetrics> stop() {
8989
return Optional.absent();
9090
}
9191
if (!fragmentSnapshotMap.isEmpty()) {
92+
// Instrumentation will be stopped and return activity data. Dangling fragments will fail.
9293
logger.debug(
9394
"Sub-recordings are still ongoing! Sub-recordings should be stopped first before stopping Activity screen trace.");
95+
fragmentSnapshotMap.clear();
9496
}
9597
Optional<PerfFrameMetrics> data = this.snapshot();
9698
try {

0 commit comments

Comments
 (0)