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

Commit 8b19286c authored by Sebastian Pickl's avatar Sebastian Pickl
Browse files

Revert "Add CAS HAL APEX"

Revert submission 2742398-cas-apex

Reason for revert: culprit for flake b/300311777, verified with go/abtd with 15 runs to make sure the flake is gone https://android-build.googleplex.com/builds/abtd/run/L46500000963034919

Bug:300311777

Reverted changes: /q/submissionid:2742398-cas-apex

Change-Id: Ia13d761d7df501fb30170a69462427198bcf924d
parent 4fb30ff5
Loading
Loading
Loading
Loading
+7 −45
Original line number Original line Diff line number Diff line
@@ -26,7 +26,6 @@ cc_library_static {
        "liblog",
        "liblog",
        "libutils",
        "libutils",
        "libcutils",
        "libcutils",
        "libvndksupport",
    ],
    ],
    static_libs: [
    static_libs: [
        "libaidlcommonsupport",
        "libaidlcommonsupport",
@@ -44,39 +43,34 @@ cc_defaults {


    srcs: ["service.cpp"],
    srcs: ["service.cpp"],


    stl: "c++_static",
    static_libs: [
    static_libs: [
        "android.hardware.cas-V1-ndk",
        "android.hardware.common-V2-ndk",
        "libaidlcommonsupport",
        "libaidlcommonsupport",
        "libbase",
        "libcasexampleimpl",
        "libcasexampleimpl",
        "libcutils",
        "libutils",
    ],
    ],
    shared_libs: [
    shared_libs: [
        "android.hardware.cas-V1-ndk",
        "libbase",
        "libbinder_ndk",
        "libbinder_ndk",
        "liblog",
        "liblog",
        "libvndksupport",
        "libutils",
        "libcutils",
    ],
    ],
    header_libs: ["media_plugin_headers"],
    header_libs: ["media_plugin_headers"],
    vintf_fragments: ["android.hardware.cas-service.xml"],
}
}


cc_binary {
cc_binary {
    name: "android.hardware.cas-service.example",
    name: "android.hardware.cas-service.example",
    defaults: ["cas_service_example_defaults"],
    defaults: ["cas_service_example_defaults"],
    // Installed in APEX
    init_rc: ["cas-default.rc"],
    installable: false,
}
}


// TODO(b/297467514) Convert to VAPEX
cc_binary {
cc_binary {
    name: "android.hardware.cas-service.example-lazy",
    name: "android.hardware.cas-service.example-lazy",
    defaults: ["cas_service_example_defaults"],
    defaults: ["cas_service_example_defaults"],
    init_rc: ["cas-default-lazy.rc"],
    init_rc: ["cas-default-lazy.rc"],
    vintf_fragments: ["android.hardware.cas-service.xml"],
    cflags: ["-DLAZY_SERVICE"],
    cflags: ["-DLAZY_SERVICE"],
    overrides: ["com.android.hardware.cas"],
    overrides: ["android.hardware.cas-service.example"],
}
}


cc_fuzz {
cc_fuzz {
@@ -90,7 +84,6 @@ cc_fuzz {
        "android.hardware.cas-V1-ndk",
        "android.hardware.cas-V1-ndk",
        "libcutils",
        "libcutils",
        "liblog",
        "liblog",
        "libvndksupport",
    ],
    ],
    static_libs: [
    static_libs: [
        "libaidlcommonsupport",
        "libaidlcommonsupport",
@@ -101,34 +94,3 @@ cc_fuzz {
        componentid: 1344,
        componentid: 1344,
    },
    },
}
}

apex {
    name: "com.android.hardware.cas",
    manifest: "manifest.json",
    file_contexts: "file_contexts",
    key: "com.android.hardware.key",
    certificate: ":com.android.hardware.certificate",
    updatable: false,
    vendor: true,

    binaries: [
        "android.hardware.cas-service.example",
    ],
    prebuilts: [
        "cas-default.rc",
        "android.hardware.cas-service.xml",
    ],
}

prebuilt_etc {
    name: "cas-default.rc",
    src: "cas-default.rc",
    installable: false,
}

prebuilt_etc {
    name: "android.hardware.cas-service.xml",
    src: "android.hardware.cas-service.xml",
    sub_dir: "vintf",
    installable: false,
}
+2 −3
Original line number Original line Diff line number Diff line
@@ -19,7 +19,6 @@
#include "SharedLibrary.h"
#include "SharedLibrary.h"
#include <dlfcn.h>
#include <dlfcn.h>
#include <utils/Log.h>
#include <utils/Log.h>
#include <vndksupport/linker.h>


namespace aidl {
namespace aidl {
namespace android {
namespace android {
@@ -27,12 +26,12 @@ namespace hardware {
namespace cas {
namespace cas {


SharedLibrary::SharedLibrary(const String8& path) {
SharedLibrary::SharedLibrary(const String8& path) {
    mLibHandle = android_load_sphal_library(path.c_str(), RTLD_NOW);
    mLibHandle = dlopen(path.c_str(), RTLD_NOW);
}
}


SharedLibrary::~SharedLibrary() {
SharedLibrary::~SharedLibrary() {
    if (mLibHandle != NULL) {
    if (mLibHandle != NULL) {
        android_unload_sphal_library(mLibHandle);
        dlclose(mLibHandle);
        mLibHandle = NULL;
        mLibHandle = NULL;
    }
    }
}
}
+1 −1
Original line number Original line Diff line number Diff line
service vendor.cas-default /apex/com.android.hardware.cas/bin/hw/android.hardware.cas-service.example
service vendor.cas-default /vendor/bin/hw/android.hardware.cas-service.example
    interface aidl android.hardware.cas.IMediaCasService/default
    interface aidl android.hardware.cas.IMediaCasService/default
    class hal
    class hal
    user media
    user media

cas/aidl/default/file_contexts

deleted100644 → 0
+0 −3
Original line number Original line Diff line number Diff line
(/.*)?                                                          u:object_r:vendor_file:s0
/etc(/.*)?                                                      u:object_r:vendor_configs_file:s0
/bin/hw/android\.hardware\.cas-service\.example                 u:object_r:hal_cas_default_exec:s0

cas/aidl/default/manifest.json

deleted100644 → 0
+0 −9
Original line number Original line Diff line number Diff line
{
    "name": "com.android.hardware.cas",
    "version": 1,
    // For CAS HAL to open plugins from /vendor/lib, "vendor" namespace should be imported.
    // ":sphal" is an alias for the "vendor" namespace in Vendor APEX.
    "requireNativeLibs": [
        ":sphal"
    ]
}