music: rework indexer thread safety

Move the switch from IO to Main to within Indexer itself, through
withContext.

This is much easier to work with than the previous system of a separate
"update" coroutine, which isn't really needed anymore given that I no
longer need to do IO work when sanitizing the playback state.
This commit is contained in:
OxygenCobalt
2022-07-07 16:47:21 -06:00
parent 29cc680c34
commit 94f2d28936
22 changed files with 102 additions and 73 deletions
+1 -1
View File
@@ -77,7 +77,7 @@
extracting metadata, and constructing the music library.
-->
<service
android:name=".music.IndexerService"
android:name=".music.system.IndexerService"
android:foregroundServiceType="dataSync"
android:icon="@mipmap/ic_launcher"
android:exported="false"