Skip to content

Commit a5f6558

Browse files
committed
Addressing Rayo's comments
1 parent 9214f9e commit a5f6558

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ private String doGetId() {
293293
PersistedInstallationEntry prefs = getPrefsWithGeneratedIdMultiProcessSafe();
294294
// Execute network calls (CreateInstallations) to the FIS Servers on a separate executor
295295
// i.e networkExecutor
296-
networkExecutor.execute(() -> doNetworkCall(false));
296+
networkExecutor.execute(() -> doNetworkCallIfNecessary(false));
297297
return prefs.getFirebaseInstallationId();
298298
}
299299

@@ -318,10 +318,10 @@ private void doGetAuthToken(boolean forceRefresh) {
318318
triggerOnStateReached(prefs);
319319
// Execute network calls (CreateInstallations or GenerateAuthToken) to the FIS Servers on
320320
// a separate executor i.e networkExecutor
321-
networkExecutor.execute(() -> doNetworkCall(forceRefresh));
321+
networkExecutor.execute(() -> doNetworkCallIfNecessary(forceRefresh));
322322
}
323323

324-
private void doNetworkCall(boolean forceRefresh) {
324+
private void doNetworkCallIfNecessary(boolean forceRefresh) {
325325
PersistedInstallationEntry prefs = getMultiProcessSafePrefs();
326326
// There are two possible cleanup steps to perform at this stage: the FID may need to
327327
// be registered with the server or the FID is registered but we need a fresh authtoken.

0 commit comments

Comments
 (0)