commit | fe37710d689b7573ddeb901141db42c28b6cab39 | [log] [tgz] |
---|---|---|
author | Marie Janssen <jamuraa@google.com> | Tue Oct 11 16:09:58 2016 -0700 |
committer | Marie Janssen <jamuraa@google.com> | Tue Oct 18 14:23:22 2016 -0700 |
tree | 3d15b04e35bc7b4bf2a9d27070cb6ca4794e8f50 | |
parent | 17227a122d0a131ee7242974732029afadaca5e3 [diff] |
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