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

Skip to content
Commit e13c679e authored by Mikhail Naganov's avatar Mikhail Naganov Committed by jiabin
Browse files

audiopolicy: Load the engine library dynamically

Android provides 2 audio policy engines:
libaudiopolicyenginedefault and
libaudiopolicyengineconfigurable. This change makes the engine
to be loaded dynamically based on the configuration (currently
the engine name is hardcoded into AudioPolicyConfig). Dynamic
loading allows building and installing of both libraries without
any conflicts.

Technical changes:

 - AudioPolicyManagerInterface renamed to EngineInterface
   for clarity;

 - For the purpose of dynamic loading, APM does not depend
   anymore on the EngineInstance class. The class got removed
   from the default AP engine, but left in the configurable engine
   because it is also used by its plugins;

 - Added EngineLibrary class to encapsulate dynamic loading
   of the AP engine. The class name EngineInstance is repurposed
   for a smart pointer to EngineInterface;

 - services/audiopolicy/managerdefault/Android.mk converted
   into Android.bp;

 - Added engine loading failure test;

Bug: 132639720
Test: sanity tests for audio; audiopolicy_tests
Change-Id: I0581569a172f810e030aec879225e817bfa7851a
Merged-In: I0581569a172f810e030aec879225e817bfa7851a
parent 3e0b02e3
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