这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@davidliu
Copy link
Contributor

@davidliu davidliu commented Mar 7, 2024

No description provided.

@davidliu
Copy link
Contributor Author

davidliu commented Mar 8, 2024

For future reference: https://android.googlesource.com/platform/frameworks/base/+/dafed3d00818713b60ec09cfff482487a3405202

Pre 8.1 didn't have this fix, and so unregisterNetworkCallback would only unregister the most recent request and "leak" prior requests. An app can only have up to 100 ongoing requests at a time, otherwise it'll throw an exception. Notably, WebRTC also registers a callback in NetworkMonitorAutoDetect, so the exception would crash the app.

@davidliu davidliu merged commit 48ed7c5 into main Mar 8, 2024
@davidliu davidliu deleted the dl/network_request_leak branch March 8, 2024 04:55
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.

2 participants