@@ -68,7 +68,6 @@ public class AppStartTrace implements ActivityLifecycleCallbacks {
68
68
private static final int CORE_POOL_SIZE = 0 ;
69
69
private static final int MAX_POOL_SIZE = 1 ; // Only need single thread
70
70
71
- private static volatile AppStartTrace instance ;
72
71
private static ExecutorService executorService ;
73
72
74
73
private boolean isRegisteredForLifecycleCallbacks = false ;
@@ -129,29 +128,17 @@ public static void setLauncherActivityOnResumeTime(String activity) {
129
128
// no-op, for backward compatibility with old version plugin.
130
129
}
131
130
132
- public static AppStartTrace getInstance () {
133
- return instance != null ? instance : getInstance (TransportManager .getInstance (), new Clock ());
134
- }
135
-
136
- static AppStartTrace getInstance (TransportManager transportManager , Clock clock ) {
137
- if (instance == null ) {
138
- synchronized (AppStartTrace .class ) {
139
- if (instance == null ) {
140
- instance =
141
- new AppStartTrace (
142
- transportManager ,
143
- clock ,
144
- ConfigResolver .getInstance (),
145
- new ThreadPoolExecutor (
146
- CORE_POOL_SIZE ,
147
- MAX_POOL_SIZE ,
148
- /* keepAliveTime= */ MAX_LATENCY_BEFORE_UI_INIT + 10 ,
149
- TimeUnit .SECONDS ,
150
- new LinkedBlockingQueue <>()));
151
- }
152
- }
153
- }
154
- return instance ;
131
+ public AppStartTrace () {
132
+ this (
133
+ TransportManager .getInstance (),
134
+ new Clock (),
135
+ ConfigResolver .getInstance (),
136
+ new ThreadPoolExecutor (
137
+ CORE_POOL_SIZE ,
138
+ MAX_POOL_SIZE ,
139
+ /* keepAliveTime= */ MAX_LATENCY_BEFORE_UI_INIT + 10 ,
140
+ TimeUnit .SECONDS ,
141
+ new LinkedBlockingQueue <>()));
155
142
}
156
143
157
144
AppStartTrace (
0 commit comments