Skip to content

Commit

Permalink
fix(root/enhanced-processing): ignore non-media streams when scanning…
Browse files Browse the repository at this point in the history
… for audio sessions
  • Loading branch information
timschneeb committed Sep 9, 2023
1 parent e14b690 commit c31cddf
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ class RootSessionDatabase(context: Context) : BaseSessionDatabase(context) {
}
}

override fun shouldAcceptSessionDump(id: Int, session: AudioSessionDumpEntry) = true
override fun shouldAcceptSessionDump(id: Int, session: AudioSessionDumpEntry): Boolean {
if (!session.isUsageRecordable()) {
Timber.d("Skipped session $id due to usage ($session)")
return false
}
return true
}
override fun shouldAddSession(id: Int, uid: Int, packageName: String) = true

override fun onSessionRemoved(item: IEffectSession) {
Expand Down

0 comments on commit c31cddf

Please sign in to comment.