48
48
import com .google .firebase .sessions .api .FirebaseSessionsDependencies ;
49
49
import java .util .List ;
50
50
import java .util .concurrent .Callable ;
51
+ import java .util .concurrent .Executor ;
51
52
import java .util .concurrent .ExecutorService ;
52
53
53
54
/**
@@ -71,7 +72,7 @@ public class FirebaseCrashlytics {
71
72
@ NonNull Deferred <CrashlyticsNativeComponent > nativeComponent ,
72
73
@ NonNull Deferred <AnalyticsConnector > analyticsConnector ,
73
74
@ NonNull Deferred <FirebaseRemoteConfigInterop > remoteConfigInteropDeferred ,
74
- @ Background ExecutorService liteExecutorService ,
75
+ @ Background ExecutorService backgroundExecutorService ,
75
76
@ Blocking ExecutorService blockingExecutorService ) {
76
77
77
78
Context context = app .getApplicationContext ();
@@ -151,8 +152,8 @@ public class FirebaseCrashlytics {
151
152
152
153
Logger .getLogger ().v ("Installer package name is: " + appData .installerPackageName );
153
154
154
- final ExecutorService threadPoolExecutor =
155
- ExecutorUtils .buildSingleThreadExecutorService ( "com.google.firebase.crashlytics.startup" );
155
+ final Executor threadPoolExecutor =
156
+ ExecutorUtils .buildSequentialExecutor ( backgroundExecutorService );
156
157
157
158
final SettingsController settingsController =
158
159
SettingsController .create (
@@ -182,17 +183,9 @@ public Object then(@NonNull Task<Void> task) throws Exception {
182
183
183
184
final boolean finishCoreInBackground = core .onPreExecute (appData , settingsController );
184
185
185
- Tasks .call (
186
- threadPoolExecutor ,
187
- new Callable <Void >() {
188
- @ Override
189
- public Void call () throws Exception {
190
- if (finishCoreInBackground ) {
191
- core .doBackgroundInitializationAsync (settingsController );
192
- }
193
- return null ;
194
- }
195
- });
186
+ if (finishCoreInBackground ) {
187
+ core .doBackgroundInitializationAsync (settingsController );
188
+ }
196
189
197
190
return new FirebaseCrashlytics (core );
198
191
}
0 commit comments