Always setup the native bridge library
... even if the string is empty. This will initialize the native bridge
library but mark it as unavailable.
- also, rename native_bridge_library_path to
native_bridge_library_filename to be closer to the actual meaning (it's
just the filename without any path).
Bug: 16404669
(cherry picked from commit I94628639691459d48d1fbf0841f36b68d51818e7)
Change-Id: I94628639691459d48d1fbf0841f36b68d51818e7
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index ee8cbe1..84df444 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -712,11 +712,12 @@
self->ClearException();
// Look for a native bridge.
- native_bridge_library_path_ = options->native_bridge_library_path_;
- if (!native_bridge_library_path_.empty()) {
- android::SetupNativeBridge(native_bridge_library_path_.c_str(), &native_bridge_art_callbacks_);
- VLOG(startup) << "Runtime::Setup native bridge library: " << native_bridge_library_path_;
- }
+ native_bridge_library_filename_ = options->native_bridge_library_filename_;
+ android::SetupNativeBridge(native_bridge_library_filename_.c_str(), &native_bridge_art_callbacks_);
+ VLOG(startup) << "Runtime::Setup native bridge library: "
+ << (native_bridge_library_filename_.empty() ?
+ "(empty)" : native_bridge_library_filename_);
+
VLOG(startup) << "Runtime::Init exiting";
return true;
}