File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
firebase-appdistribution/src/main/java/com/google/firebase/appdistribution Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -144,8 +144,14 @@ public Task<Void> signInTester() {
144
144
.onSuccessTask (combineWithResultOf (() -> lifecycleNotifier .getForegroundActivity ()))
145
145
.addOnSuccessListener (
146
146
fidAndActivity -> {
147
+ // Launch the intent outside of the synchronized block because we don't need to wait
148
+ // for the lock, and we don't want to risk the activity leaving the foreground in
149
+ // the meantime.
150
+ openSignInFlowInBrowser (fidAndActivity .first (), fidAndActivity .second ());
151
+ // This synchronized block is required by the @GuardedBy annotation, but is not
152
+ // practically required in this case because the only reads of this variable are on
153
+ // the main thread, which this callback is also running on.
147
154
synchronized (signInTaskLock ) {
148
- openSignInFlowInBrowser (fidAndActivity .first (), fidAndActivity .second ());
149
155
hasBeenSentToBrowserForCurrentTask = true ;
150
156
}
151
157
})
You can’t perform that action at this time.
0 commit comments