File tree Expand file tree Collapse file tree
sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,10 +115,11 @@ private List<SentryThread> createThreads(
115115 exc .setStacktrace (stacktrace );
116116 }
117117
118- // Android/Linux convention: the pid of the process is the same as the tid of the main thread.
119- // The main thread is special in that it is the only thread that can create a Looper and thus
120- // handle messages on the main thread
118+ // thread id always equals the process id,
119+ // so we use it to reliably detect the main thread
121120 if (tombstone .pid == threadEntryValue .id ) {
121+ // the OS may provides a (truncated) process name; normalize it
122+ // back to "main" so downstream consumers see a consistent name
122123 thread .setName ("main" );
123124 thread .setMain (true );
124125 }
You can’t perform that action at this time.
0 commit comments