-
Notifications
You must be signed in to change notification settings - Fork 611
Fix NetworkOnMainThreadException for API levels below 26 #6940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
1 similar comment
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
Coverage Report 1Affected Products
Test Logs |
Test Results 42 files - 2 42 suites - 2 1m 21s ⏱️ - 4m 50s Results for commit 861bd2c. ± Comparison against base commit 4c4c7c9. This pull request removes 136 and adds 324 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Size Report 1Affected ProductsTest Logs |
Startup Time Report 1Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS. Notes
Startup Times
|
This change addresses a
NetworkOnMainThreadException
that was observed on Android API levels below 26.The crash happened during background transitions when disconnecting an
HttpURLConnection
because background callbacks on these older OS versions could run on the main thread. The fix restricts the disconnect logic to run only on API level 26 (Android 8.0) and higher.