Skip to content

Fix RootDetection background ANR#2202

Merged
lemnik merged 3 commits intonextfrom
PLAT-14377/fix-background-anr
Jun 27, 2025
Merged

Fix RootDetection background ANR#2202
lemnik merged 3 commits intonextfrom
PLAT-14377/fix-background-anr

Conversation

@lemnik
Copy link
Copy Markdown
Contributor

@lemnik lemnik commented Jun 20, 2025

Goal

Fix background ANRs that occur on startup when waiting for the RootDetection sub-process to complete.

Design

Added a timed Process.waitFor to the RootDetection to limit the amount of time the sub-process can take before we continue with startup.

Also generally moved more of the startup process waits to later to allow more to complete in parallel.

Testing

Manually tested blocking the sub-process, and relied on existing tests for the remaining changes.

@lemnik lemnik requested a review from tomlongridge June 20, 2025 14:12
@lemnik lemnik requested a review from YYChen01988 as a code owner June 20, 2025 14:12
@lemnik lemnik force-pushed the PLAT-14377/fix-background-anr branch from 2963269 to b2c6334 Compare June 20, 2025 14:12
@bugsnagbot
Copy link
Copy Markdown
Collaborator

bugsnagbot commented Jun 20, 2025

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1832.21 1634.65
arm64_v8a 639.23 442.63
armeabi_v7a 577.8 377.1
x86 717.04 516.34
x86_64 684.28 483.58

Generated by 🚫 Danger

@lemnik lemnik force-pushed the PLAT-14377/fix-background-anr branch from b2c6334 to 31b6fcc Compare June 24, 2025 16:34
Copy link
Copy Markdown
Contributor

@YYChen01988 YYChen01988 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lemnik lemnik merged commit f7ef874 into next Jun 27, 2025
35 checks passed
@lemnik lemnik deleted the PLAT-14377/fix-background-anr branch June 27, 2025 11:51
This was referenced Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants