File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
sentry-android-core/src/main/java/io/sentry/android/core/performance Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 88
99### Fixes
1010
11+ - Fix app start spans missing from Pixel devices ([ #3634 ] ( https://github.com/getsentry/sentry-java/pull/3634 ) )
1112- Avoid ArrayIndexOutOfBoundsException on Android cpu data collection ([ #3598 ] ( https://github.com/getsentry/sentry-java/pull/3598 ) )
1213- Fix lazy select queries instrumentation ([ #3604 ] ( https://github.com/getsentry/sentry-java/pull/3604 ) )
1314- Session Replay: buffer mode improvements ([ #3622 ] ( https://github.com/getsentry/sentry-java/pull/3622 ) )
Original file line number Diff line number Diff line change @@ -241,6 +241,14 @@ public void registerApplicationForegroundCheck(final @NotNull Application applic
241241 isCallbackRegistered = true ;
242242 appLaunchedInForeground = appLaunchedInForeground || ContextUtils .isForegroundImportance ();
243243 application .registerActivityLifecycleCallbacks (instance );
244+ // We post on the main thread a task to post a check on the main thread. On Pixel devices
245+ // (possibly others) the first task posted on the main thread is called before the
246+ // Activity.onCreate callback. This is a workaround for that, so that the Activity.onCreate
247+ // callback is called before the application one.
248+ new Handler (Looper .getMainLooper ()).post (() -> checkCreateTimeOnMain (application ));
249+ }
250+
251+ private void checkCreateTimeOnMain (final @ NotNull Application application ) {
244252 new Handler (Looper .getMainLooper ())
245253 .post (
246254 () -> {
You can’t perform that action at this time.
0 commit comments