Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1db3a365 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

AudioService: cache routing queries by stream types

Add support for caching the result of getDevicesForStream
in the AudioSystem adapter class, as well as stats
(number of calls + time spent in methods) and debug mode
(to compare value in cache with real query).
Also add hooks for invalidation of the cache, either
through a callback from APM, or whenever an AudioSystem
method is called that will affect routing and should
cause a cache invalidation.

Bug: 162448412
Test: atest AudioServiceHostTest#testPreferredDeviceRouting
Test: atest AudioServiceHostTest#testDevicesForAttributes
Change-Id: Icceef4edb89653c7d0eddbef523c9cde2c33185b
parent 76469cbe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment