Skip to content

Commit b7ea8d6

Browse files
committed
Fix onUpdateAppState
1 parent fbd31de commit b7ea8d6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

firebase-perf/src/main/java/com/google/firebase/perf/session/gauges/GaugeManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@ public void initializeGaugeMetadataManager(Context appContext) {
102102
public void onUpdateAppState(ApplicationProcessState applicationProcessState) {
103103
this.applicationProcessState = applicationProcessState;
104104

105-
if (session == null || !session.isVerbose()) {
105+
if (session == null) {
106106
return;
107107
}
108108

109-
// If it's a verbose session, start collecting gauges for the new app state.
110-
startCollectingGauges(this.applicationProcessState, session.getTimer());
109+
if (session.isVerbose()) {
110+
// If it's a verbose session, start collecting gauges for the new app state.
111+
startCollectingGauges(this.applicationProcessState, session.getTimer());
112+
}
111113
}
112114

113115
/** Returns the singleton instance of this class. */

0 commit comments

Comments
 (0)