+
Skip to content

Conversation

TimoPtr
Copy link
Member

@TimoPtr TimoPtr commented Aug 26, 2025

Summary

Part of the effort describe in #5688 we should remove all the runBlocking. The one in the LocationSensorManager are causing significant of ANRs within the app. The changes are quite straightforward I tested the changes on Android 16. I didn't see any regression there.

Checklist

  • New or updated tests have been added to cover the changes following the testing guidelines.
  • The code follows the project's code style and best_practices.
  • The changes have been thoroughly tested, and edge cases have been considered.
  • Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.

@jpelgrom
Copy link
Member

jpelgrom commented Sep 1, 2025

So why did you use sensorWorkerScope? In other places when calling sendLocationUpdate, ioScope is used.

@TimoPtr
Copy link
Member Author

TimoPtr commented Sep 1, 2025

So why did you use sensorWorkerScope? In other places when calling sendLocationUpdate, ioScope is used.

I though it was tight to a lifecycle but in the end it isn't so I'm going to use IO 👍🏻. I don't think it has a huge impact since the underlying calls are made on another coroutine already on the DAO.

@jpelgrom jpelgrom enabled auto-merge (squash) September 1, 2025 15:28
@jpelgrom jpelgrom merged commit 4508339 into main Sep 1, 2025
19 checks passed
@jpelgrom jpelgrom deleted the fix/5688-location-manager-runblocking branch September 1, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载