diff options
| author | 2023-03-02 15:59:11 -0800 | |
|---|---|---|
| committer | 2023-03-03 12:22:18 -0800 | |
| commit | 8c1d7aa0769f6a5a1b85ae31235e08b5e717e40d (patch) | |
| tree | 7a1d9ed72e39fda2dbdc3cd5d00ea85a142058e3 /cmds/bootanimation/BootAnimationUtil.cpp | |
| parent | 02f47849c03201e6e352afc319a05db9b185e3ce (diff) | |
Fix "using JNI after critical" exceptions
Refactored ScopedJavaNioBuffer implementation to copy
directly to std::vector<uint8_t> instances and release
the jni critical array queries immediately after copying
into a vector. This is to avoid potential interleavings
of JNI method calls before destructor of ScopedJavaNioBuffer
is invoked. As per jni requirements no other JNI calls are
allowed after GetPrimitiveArrayCritical until a matching call
to ReleasePrimitiveArrayCritical is made.
Fixes: 271468824
Test: Added tests to MeshTest
Change-Id: Ia4afd8b8584ae43f021c79b6a341b05e80e0e205
Diffstat (limited to 'cmds/bootanimation/BootAnimationUtil.cpp')
0 files changed, 0 insertions, 0 deletions