Fix music app filter
This commit is contained in:
parent
eaa1848f97
commit
d91fc525f8
@ -271,7 +271,7 @@ class MusicRepositoryImpl(val context: Context) : MusicRepository, KoinComponent
|
|||||||
|
|
||||||
private suspend fun isMusicApp(packageName: String): Boolean {
|
private suspend fun isMusicApp(packageName: String): Boolean {
|
||||||
val intent = Intent(Intent.ACTION_MAIN).apply { addCategory(Intent.CATEGORY_APP_MUSIC) }
|
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)
|
context.packageManager.queryIntentActivities(intent, 0)
|
||||||
.none { it.activityInfo.packageName == packageName }
|
.none { it.activityInfo.packageName == packageName }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user