summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
81475bc)
The property is set by the Settings app.
-service enable_houdini /system/bin/enable_houdini
+service nativebridge /system/bin/enable_nativebridge
oneshot
service powerbtnd /system/bin/powerbtnd
oneshot
service powerbtnd /system/bin/powerbtnd
on property:debug.logcat=1
class_start debug
on property:debug.logcat=1
class_start debug
+
+on property:persist.sys.nativebridge=1
+ start nativebridge
+
+on property:persist.sys.nativebridge=0
+ stop nativebridge
LOCAL_SRC_FILES := src/libnb.cpp
LOCAL_CFLAGS := -Werror -Wall
LOCAL_CPPFLAGS := -std=c++11
LOCAL_SRC_FILES := src/libnb.cpp
LOCAL_CFLAGS := -Werror -Wall
LOCAL_CPPFLAGS := -std=c++11
-LOCAL_SHARED_LIBRARIES := libdl liblog
+LOCAL_SHARED_LIBRARIES := libcutils libdl liblog
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
#include <dlfcn.h>
#include <cutils/log.h>
#include <dlfcn.h>
#include <cutils/log.h>
+#include <cutils/properties.h>
#include "nativebridge/native_bridge.h"
namespace android {
#include "nativebridge/native_bridge.h"
namespace android {
const char *isa)
{
ALOGV("enter native_bridge2_initialize %s %s", app_code_cache_dir, isa);
const char *isa)
{
ALOGV("enter native_bridge2_initialize %s %s", app_code_cache_dir, isa);
- NativeBridgeCallbacks *cb = get_callbacks();
- return cb ? cb->initialize(art_cbs, app_code_cache_dir, isa) : false;
+ if (property_get_bool("persist.sys.nativebridge", 0)) {
+ if (NativeBridgeCallbacks *cb = get_callbacks()) {
+ return cb->initialize(art_cbs, app_code_cache_dir, isa);
+ }
+ } else {
+ ALOGW("Native bridge is disabled");
+ }
+ return false;
}
static void *native_bridge2_loadLibrary(const char *libpath, int flag)
}
static void *native_bridge2_loadLibrary(const char *libpath, int flag)