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
Loading
Please register or sign in to comment