Skip to content

Commit cbc422e

Browse files
authored
Move Preconditions check to FirebaseInstallations constructor. (#1619)
1 parent 5e452a9 commit cbc422e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public Thread newThread(Runnable r) {
139139
TimeUnit.SECONDS,
140140
new LinkedBlockingQueue<>(),
141141
THREAD_FACTORY);
142+
preConditionChecks();
142143
}
143144

144145
/**
@@ -216,7 +217,6 @@ String getName() {
216217
@NonNull
217218
@Override
218219
public Task<String> getId() {
219-
preConditionChecks();
220220
return Tasks.forResult(doGetId());
221221
}
222222

@@ -231,7 +231,6 @@ public Task<String> getId() {
231231
@NonNull
232232
@Override
233233
public Task<InstallationTokenResult> getToken(boolean forceRefresh) {
234-
preConditionChecks();
235234
Task<InstallationTokenResult> task = addGetAuthTokenListener();
236235
backgroundExecutor.execute(() -> doGetAuthToken(forceRefresh));
237236
return task;

0 commit comments

Comments
 (0)