File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
firebase-perf/src/main/java/com/google/firebase/perf/session/gauges Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -102,14 +102,13 @@ public void initializeGaugeMetadataManager(Context appContext) {
102102 public void onUpdateAppState (ApplicationProcessState applicationProcessState ) {
103103 this .applicationProcessState = applicationProcessState ;
104104
105- if (session == null ) {
105+ if (session == null || ! session . isVerbose () ) {
106106 return ;
107107 }
108108
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- }
109+ // If it's a verbose session, start collecting gauges for the new app state.
110+ // This
111+ startCollectingGauges (this .applicationProcessState , session .getTimer ());
113112 }
114113
115114 /** Returns the singleton instance of this class. */
@@ -153,7 +152,9 @@ public void startCollectingGauges(PerfSession session) {
153152 }
154153
155154 /**
156- * Starts the collection of available Gauges for the given {@code appState}.
155+ * Starts the collection of available Gauges for the given {@code appState}. If it's being
156+ * collected for a different app state, it stops that prior to starting it for the given
157+ * {@code appState}.
157158 *
158159 * @param appState The app state to which the collected gauges are associated.
159160 * @param referenceTime The time off which the system time is calculated when collecting gauges.
You can’t perform that action at this time.
0 commit comments