Commit graph

6 commits

Author SHA1 Message Date
Andreas Gampe
a6ac9ce98b LibNativeBridge: Version 2
Add a callback function to retrieve "signal handler" from the bridge,
if the bridge wants it to be managed by the runtime. The signal handler
will be invoked after the runtime's own one, and before any other
chained handler.

Add a callback function to check compatibility of the bridge with the
library.

Add a function to expose the native bridge version. Add a test for this
function.

Bug: 20217701
Change-Id: Ic23a60b949f119c7d8b0e7cb27a61e6c16532a23
2015-05-14 20:20:49 -07:00
Calin Juravle
f9d9e2a2d9 Handle code_cache dir creation in libnativebridge
Also:

- add kPreInitiliazed state to native bridge with check transition:
kOpened->kPreInitialized->kInitialized
- made sure we free the memory for the code_cache_path
- tidy up some error messages
- tidy up tests
- add a dummy native bridge to test with

Bug: 18027433
Bug: 18097480

Change-Id: I39f74c93580f2e224080dd3df2ffaa9cf9f8cd9c
2014-10-27 15:03:13 +00:00
jgu21
ab0da5a9a6 LibNativeBridge: Add early init & env setup
Add a method to set up /proc/cpuinfo with enough privileges. Set
up the environment for an app in InitializeNativeBridge().

Turn on -Wall for libnativebridge.

Change-Id: I0b93da93251c6b4638de786bf98cf99df07c3fc2
2014-09-23 20:08:25 -07:00
Andreas Gampe
035bd7541e NativeBridge: Refactor for new initialization flow
Setup becomes Load, have explicit Initialize and Unload.

Change-Id: I5a20de1cb68dd1802937b369b14c50c9c1031c67
2014-09-04 12:57:54 -07:00
Andreas Gampe
049249ce7a NativeBridge: Tighten security on libnativebridge
Do not allow arbitrary paths for the native bridge - only allow
simple names.

Do not allow re-setup of the native bridge.

Bug: 16404669

(cherry picked from commit cd2ef4c1af)

Change-Id: Ie22de356d2307fe2758f9094a85d44e61a4098a1
2014-08-22 01:44:06 -07:00
Calin Juravle
961ae12dea Move native bridge library in system/core
Bug: 16884833

Change-Id: I73aab8e212860ba5aee9444d801806d3da326a41
2014-08-12 22:39:25 +01:00