Fix music app filter

This commit is contained in:
MM20 2022-01-09 15:23:50 +01:00
parent eaa1848f97
commit d91fc525f8
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -271,7 +271,7 @@ class MusicRepositoryImpl(val context: Context) : MusicRepository, KoinComponent
private suspend fun isMusicApp(packageName: String): Boolean {
val intent = Intent(Intent.ACTION_MAIN).apply { addCategory(Intent.CATEGORY_APP_MUSIC) }
return withContext(Dispatchers.IO) {
return !withContext(Dispatchers.IO) {
context.packageManager.queryIntentActivities(intent, 0)
.none { it.activityInfo.packageName == packageName }
}