18
18
import com .google .firebase .analytics .connector .AnalyticsConnector ;
19
19
import com .google .firebase .annotations .concurrent .Background ;
20
20
import com .google .firebase .annotations .concurrent .Blocking ;
21
+ import com .google .firebase .annotations .concurrent .Lightweight ;
21
22
import com .google .firebase .components .Component ;
22
23
import com .google .firebase .components .ComponentContainer ;
23
24
import com .google .firebase .components .ComponentRegistrar ;
@@ -42,6 +43,8 @@ public class CrashlyticsRegistrar implements ComponentRegistrar {
42
43
Qualified .qualified (Background .class , ExecutorService .class );
43
44
private final Qualified <ExecutorService > blockingExecutorService =
44
45
Qualified .qualified (Blocking .class , ExecutorService .class );
46
+ private final Qualified <ExecutorService > lightweightExecutorService =
47
+ Qualified .qualified (Lightweight .class , ExecutorService .class );
45
48
46
49
static {
47
50
// Add Crashlytics as a dependency of Sessions when this class is loaded into memory.
@@ -57,6 +60,7 @@ public List<Component<?>> getComponents() {
57
60
.add (Dependency .required (FirebaseInstallationsApi .class ))
58
61
.add (Dependency .required (backgroundExecutorService ))
59
62
.add (Dependency .required (blockingExecutorService ))
63
+ .add (Dependency .required (lightweightExecutorService ))
60
64
.add (Dependency .deferred (CrashlyticsNativeComponent .class ))
61
65
.add (Dependency .deferred (AnalyticsConnector .class ))
62
66
.add (Dependency .deferred (FirebaseRemoteConfigInterop .class ))
@@ -79,7 +83,8 @@ private FirebaseCrashlytics buildCrashlytics(ComponentContainer container) {
79
83
container .getDeferred (AnalyticsConnector .class ),
80
84
container .getDeferred (FirebaseRemoteConfigInterop .class ),
81
85
container .get (backgroundExecutorService ),
82
- container .get (blockingExecutorService ));
86
+ container .get (blockingExecutorService ),
87
+ container .get (lightweightExecutorService ));
83
88
84
89
long duration = System .currentTimeMillis () - startTime ;
85
90
if (duration > 16 ) {
0 commit comments