summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Ivanov2017-05-01 17:12:49 -0500
committerDimitry Ivanov2017-05-25 12:30:55 -0500
commit882cad2d87fc003ced61ddf9d68f8810ec8c4b3f (patch)
treee8c320809a6b684cfaa5bb1174e6b514b4763a78 /include
parent102eb90837d1e30fe9603b046e351c28cbaebbd9 (diff)
downloadplatform-system-core-882cad2d87fc003ced61ddf9d68f8810ec8c4b3f.tar.gz
platform-system-core-882cad2d87fc003ced61ddf9d68f8810ec8c4b3f.tar.xz
platform-system-core-882cad2d87fc003ced61ddf9d68f8810ec8c4b3f.zip
Load vendor public libraries to sphal namespace
Load vendor public libraries to sphal namespace if it exists - preserve old behavior of loading these libraries to default namespace if sphal namespace is not present on the device. Bug: http://b/37410104 Test: cts-tradefed run singleCommand cts --skip-preconditions -m CtsJniTestCases on marlin (with enabled sphal configuration) and on angler where ld.config.txt is not present. Change-Id: Iaa3fa437ba2900acc2e5b9c78039fe1553e4c9dd (cherry picked from commit af0264bbe9f5e1228eb8fb486fa3d0d8e6e8605e)
Diffstat (limited to 'include')
-rw-r--r--include/nativebridge/native_bridge.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/nativebridge/native_bridge.h b/include/nativebridge/native_bridge.h
index 929b8aec4..9bfc93523 100644
--- a/include/nativebridge/native_bridge.h
+++ b/include/nativebridge/native_bridge.h
@@ -161,6 +161,9 @@ bool NativeBridgeLinkNamespaces(native_bridge_namespace_t* from, native_bridge_n
161// Use NativeBridgeLoadLibrary() instead in non-namespace scenario. 161// Use NativeBridgeLoadLibrary() instead in non-namespace scenario.
162void* NativeBridgeLoadLibraryExt(const char* libpath, int flag, native_bridge_namespace_t* ns); 162void* NativeBridgeLoadLibraryExt(const char* libpath, int flag, native_bridge_namespace_t* ns);
163 163
164// Returns vendor namespace if it is enabled for the device and null otherwise
165native_bridge_namespace_t* NativeBridgeGetVendorNamespace();
166
164// Native bridge interfaces to runtime. 167// Native bridge interfaces to runtime.
165struct NativeBridgeCallbacks { 168struct NativeBridgeCallbacks {
166 // Version number of the interface. 169 // Version number of the interface.
@@ -348,6 +351,15 @@ struct NativeBridgeCallbacks {
348 // Starting with v3, NativeBridge has two scenarios: with/without namespace. 351 // Starting with v3, NativeBridge has two scenarios: with/without namespace.
349 // Use loadLibrary instead in non-namespace scenario. 352 // Use loadLibrary instead in non-namespace scenario.
350 void* (*loadLibraryExt)(const char* libpath, int flag, native_bridge_namespace_t* ns); 353 void* (*loadLibraryExt)(const char* libpath, int flag, native_bridge_namespace_t* ns);
354
355 // Get native bridge version of vendor namespace.
356 // The vendor namespace is the namespace used to load vendor public libraries.
357 // With O release this namespace can be different from the default namespace.
358 // For the devices without enable vendor namespaces this function should return null
359 //
360 // Returns:
361 // vendor namespace or null if it was not set up for the device
362 native_bridge_namespace_t* (*getVendorNamespace)();
351}; 363};
352 364
353// Runtime interfaces to native bridge. 365// Runtime interfaces to native bridge.