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

Skip to content
Commit 291303ba authored by Wei-Ta Chen's avatar Wei-Ta Chen
Browse files

Fix a bug, where one thread is using JNIEnv associated with another thread.

We see abort messages like this when using JavaPixelAllocator and JavaMemoryUsageReporter.
W/dalvikvm(  680): JNI WARNING: threadid=2 using env from threadid=10
W/dalvikvm(  680):              in Landroid/graphics/LargeBitmap;.nativeClean (I)V (CallVoidMethodV)

To fix it, we keep JavaVM, rather than JNIEnv, in JavaPixelAllocator and JavaMemoryUsageReporter,
because JavaVM allows us to get the JNIEnv corresponds to the current thread.

Change-Id: Ibd4b394a53dd3fdccc5a442eeb0dedf836479575
parent 6ab94608
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment