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

Commit fc1753bd authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Android (Google) Code Review
Browse files

Merge "libaudiohal@aidl: Use system property to detect IHalAdapterVendorExtension" into main

parents 55db67d9 38a39325
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ import android.hardware.audio.core.VendorParameter;
 * is optional. Vendors may provide an implementation on the system_ext
 * partition. The default instance of this interface, if provided, must be
 * registered prior to the moment when the audio server connects to HAL modules.
 * Vendors need to set the system property `ro.audio.ihaladaptervendorextension_enabled`
 * to `true` for the framework to bind to this service.
 *
 * {@hide}
 */
+3 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include <aidl/android/hardware/audio/core/IModule.h>
#include <aidl/android/media/audio/BnHalAdapterVendorExtension.h>
#include <android/binder_manager.h>
#include <cutils/properties.h>
#include <media/AidlConversionNdkCpp.h>
#include <media/AidlConversionUtil.h>
#include <utils/Log.h>
@@ -121,8 +122,8 @@ class HalAdapterVendorExtensionWrapper :
    std::shared_ptr<IHalAdapterVendorExtension> getService(bool reset = false) {
        std::lock_guard l(mLock);
        if (reset || !mVendorExt.has_value()) {
            if (property_get_bool("ro.audio.ihaladaptervendorextension_enabled", false)) {
                auto serviceName = std::string(IHalAdapterVendorExtension::descriptor) + "/default";
            if (AServiceManager_isDeclared(serviceName.c_str())) {
                mVendorExt = std::shared_ptr<IHalAdapterVendorExtension>(
                        IHalAdapterVendorExtension::fromBinder(ndk::SpAIBinder(
                                        AServiceManager_waitForService(serviceName.c_str()))));
+0 −1
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ cc_binary {
    relative_install_path: "hw",

    init_rc: ["android.hardware.audio.parameter_parser.example_service.rc"],
    vintf_fragments: ["android.hardware.audio.parameter_parser.example_service.xml"],

    defaults: [
        "android.hardware.audio.parameter_parser.example_defaults",
+0 −7
Original line number Diff line number Diff line
<manifest version="1.0" type="framework">
  <hal format="aidl">
    <name>android.media.audio</name>
    <version>1</version>
    <fqname>IHalAdapterVendorExtension/default</fqname>
  </hal>
</manifest>