Skip to content

Commit 5bd9474

Browse files
committed
gjf
1 parent 23b84cd commit 5bd9474

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ public synchronized void onActivityResumed(Activity activity) {
168168
// cases:
169169
// 1. At app startup, first activity comes to foreground.
170170
// 2. app switch from background to foreground.
171-
// 3. app already in foreground, current activity is replaced by another activity, or the current activity was paused then resumed without onStop (ex: a dialog pauses the activity, then closing it resumes)
171+
// 3. app already in foreground, current activity is replaced by another activity, or the
172+
// current activity was paused then resumed without onStop, for example by an AlertDialog
172173
if (activityToResumedMap.isEmpty()) {
173174
// The first resumed activity means app comes to foreground.
174175
resumeTime = clock.getTime();
@@ -185,7 +186,8 @@ public synchronized void onActivityResumed(Activity activity) {
185186
updateAppState(ApplicationProcessState.FOREGROUND);
186187
}
187188
} else {
188-
// case 3: app already in foreground, current activity is replaced by another activity, or the current activity was paused then resumed without onStop (ex: a dialog pauses the activity, then closing it resumes)
189+
// case 3: app already in foreground, current activity is replaced by another activity, or the
190+
// current activity was paused then resumed without onStop, for example by an AlertDialog
189191
activityToResumedMap.put(activity, true);
190192
}
191193

0 commit comments

Comments
 (0)