Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe37710d authored by Marie Janssen's avatar Marie Janssen
Browse files

jni: Use RAII to manage callback environment

CallbackEnv is a new RAII object which:
 - Retrieves the callback environment when instantiated
 - Clears exceptions when it goes out of scope
 - Centralizes checks that we are in the correct environment

It can be used the same as a pointer to JNIEnv with the -> operator and
the JNIEnv pointer can be retrieved with get();

Test: basic functionality tests
Change-Id: I004f2655e2e02847782fec794faa62da85c85d49
parent 17227a12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment