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

Commit cb570225 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Use header file for namespace functions

Test: build, boot

Change-Id: I6e37a6a98de5f200672a78b3f2de1edb9b365a71
parent 627cb60a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ LOCAL_SHARED_LIBRARIES := \
    libutils \
    libziparchive \

LOCAL_HEADER_LIBRARIES := \
    libnativeloader-dummy-headers \

LOCAL_MODULE := mediaswcodec
LOCAL_INIT_RC := mediaswcodec.rc
LOCAL_SANITIZE := scudo
+1 −17
Original line number Diff line number Diff line
@@ -20,28 +20,12 @@
#include <android/dlext.h>
#include <dlfcn.h>
#include <media/CodecServiceRegistrant.h>
#include <nativeloader/dlext_namespaces.h>
#include <utils/Log.h>
#include <utils/String8.h>

#include "MediaCodecUpdateService.h"

// Copied from GraphicsEnv.cpp
// TODO(b/37049319) Get this from a header once one exists
extern "C" {
  android_namespace_t* android_create_namespace(const char* name,
                                                const char* ld_library_path,
                                                const char* default_library_path,
                                                uint64_t type,
                                                const char* permitted_when_isolated_path,
                                                android_namespace_t* parent);
  bool android_link_namespaces(android_namespace_t* from,
                               android_namespace_t* to,
                               const char* shared_libs_sonames);
  enum {
     ANDROID_NAMESPACE_TYPE_ISOLATED = 1,
  };
}

namespace android {

void loadFromApex(const char *libDirPath) {