Skip to content

Commit 5b3369e

Browse files
committed
Fix dagger infinite recursion.
1 parent 8d462eb commit 5b3369e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

transport/transport-runtime/src/main/java/com/google/android/datatransport/runtime/TransportRuntime.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public class TransportRuntime implements TransportInternal {
4343
private final Clock uptimeClock;
4444
private final Scheduler scheduler;
4545
private final Uploader uploader;
46+
private final WorkInitializer initializer;
4647

4748
@Inject
4849
TransportRuntime(
@@ -55,8 +56,7 @@ public class TransportRuntime implements TransportInternal {
5556
this.uptimeClock = uptimeClock;
5657
this.scheduler = scheduler;
5758
this.uploader = uploader;
58-
59-
initializer.ensureContextsScheduled();
59+
this.initializer = initializer;
6060
}
6161

6262
/**
@@ -72,6 +72,7 @@ public static void initialize(Context applicationContext) {
7272
DaggerTransportRuntimeComponent.builder()
7373
.setApplicationContext(applicationContext)
7474
.build();
75+
instance.getTransportRuntime().initializer.ensureContextsScheduled();
7576
}
7677
}
7778
}

0 commit comments

Comments
 (0)