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

Skip to content
Commit ce3d1106 authored by Andy Hung's avatar Andy Hung
Browse files

AudioSystem: new service cache reduces ANRs and improves performance.

Reduced ANRs:
1) Do not block on AudioFlinger or AudioPolicy for more than 10 seconds
to prevent ANRs.  Audioserver failure is returned to the AudioService which
can be ignored as the ground truth is stored in AudioService and
audioserver is currently dead.

2) Always check for audio services upon each thread request to avoid
ServiceManager notification failure when ThreadPool is locked up.

Improved performance:
1) Trigger actions based on binder driver death notifications and
ServiceManager service notifications, saves about 300ms on Track restore.

2) Single notification handling is shared among all clients.

Flag: EXEMPT bugfix
Test: instrumented audioserver delay, audio setting responsiveness
Test: instrumented audioserver delay, avoid ANR (see bug).
Test: hotword service works
Test: atest powerstats_collector_tests
Bug: 372348587
Change-Id: Ifd5b5457f4ca181ed30b6aea7ed4effad7aebef5
parent d9567a3f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment