commit | e6335c904aafa17795b059a5d83b8b7db6c761c8 | [log] [tgz] |
---|---|---|
author | Dave Sparks <davidsparks@android.com> | Sat Mar 13 17:08:22 2010 -0800 |
committer | Dave Sparks <davidsparks@android.com> | Mon Mar 15 07:47:05 2010 -0700 |
tree | c5a9caa3324df0bf6db2fefc805f867d864cfff6 | |
parent | f0f7eb067f446927850bfc95ad1347cf2faaaf2f [diff] |
Add locking around AudioRecord release() function in JNI. Bug 2481952. There is a potential threading issue where an app could call release() on two threads. This hack adds a static lock object that serializes access to the Java fields that contain the pointer to the native AudioRecord object and weak reference to the Java object. Also modifies finalize() to call release() so that both use the locking scheme. Change-Id: I09dcb19b7f501dc582e40e8718142b493eba2518