diff options
| author | Dimitry Ivanov <dimitry@google.com> | 2016-11-02 18:03:10 -0700 |
|---|---|---|
| committer | Dimitry Ivanov <dimitry@google.com> | 2016-11-04 15:21:13 -0700 |
| commit | d836ab005a3fd70e477a01d4200483131a285c9a (patch) | |
| tree | bed575ec93b56e95650318697219c1daa75e43d8 /libnativebridge | |
| parent | 8d339e940fb6aab288287139cdc3617c52d7ae00 (diff) | |
| download | system_core-d836ab005a3fd70e477a01d4200483131a285c9a.tar.gz system_core-d836ab005a3fd70e477a01d4200483131a285c9a.tar.bz2 system_core-d836ab005a3fd70e477a01d4200483131a285c9a.zip | |
Allow different namespace types for different classloaders
An app should be able to make cross-arch calls to different apps
via other app's Context.getClassLoader()
Bug: 32542970
Test: Boot fugu. Check that there are no linker-namespace
related errors in the log.
Change-Id: I1593f4688bcde0121a5e24a707441a4935fa7dc4
Diffstat (limited to 'libnativebridge')
| -rw-r--r-- | libnativebridge/native_bridge.cc | 6 | ||||
| -rw-r--r-- | libnativebridge/tests/DummyNativeBridge3.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libnativebridge/native_bridge.cc b/libnativebridge/native_bridge.cc index 43e6c0a5b..eafc53d8d 100644 --- a/libnativebridge/native_bridge.cc +++ b/libnativebridge/native_bridge.cc @@ -551,15 +551,15 @@ int NativeBridgeUnloadLibrary(void* handle) { return -1; } -char* NativeBridgeGetError() { +const char* NativeBridgeGetError() { if (NativeBridgeInitialized()) { if (isCompatibleWith(NAMESPACE_VERSION)) { return callbacks->getError(); } else { - ALOGE("not compatible with version %d, cannot get message", NAMESPACE_VERSION); + return "native bridge implementation is not compatible with version 3, cannot get message"; } } - return nullptr; + return "native bridge is not initialized"; } bool NativeBridgeIsPathSupported(const char* path) { diff --git a/libnativebridge/tests/DummyNativeBridge3.cpp b/libnativebridge/tests/DummyNativeBridge3.cpp index c538fa071..13fce8599 100644 --- a/libnativebridge/tests/DummyNativeBridge3.cpp +++ b/libnativebridge/tests/DummyNativeBridge3.cpp @@ -68,7 +68,7 @@ extern "C" int native_bridge3_unloadLibrary(void* /* handle */) { return 0; } -extern "C" char* native_bridge3_getError() { +extern "C" const char* native_bridge3_getError() { return nullptr; } |
