diff options
author | Chih-Chung Chang <chihchung@google.com> | 2009-09-24 15:29:35 -0700 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2009-09-24 15:38:18 -0700 |
commit | 6157de0e2d87568d6d5071b11aeb033a7986b279 (patch) | |
tree | 58282c094ff3f2337ecb0f9fe317dc4191552a5f /core/jni/android_hardware_Camera.cpp | |
parent | a30071273a8ee59b300eebe515db86f9070ab4a4 (diff) | |
download | frameworks_base-6157de0e2d87568d6d5071b11aeb033a7986b279.zip frameworks_base-6157de0e2d87568d6d5071b11aeb033a7986b279.tar.gz frameworks_base-6157de0e2d87568d6d5071b11aeb033a7986b279.tar.bz2 |
Fix 2101425: Camera crashes spontaneously in preview.
The problem is we missed an "obj" parameter while calling
postEventFromNative (which put it in a field of a Message object),
so a garbage value on stack is used.
When the GC tries to follow that "obj" field, expecting to find
another object, it crashes.
Diffstat (limited to 'core/jni/android_hardware_Camera.cpp')
-rw-r--r-- | core/jni/android_hardware_Camera.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp index 6b92994..e944654 100644 --- a/core/jni/android_hardware_Camera.cpp +++ b/core/jni/android_hardware_Camera.cpp @@ -112,7 +112,7 @@ void JNICameraContext::notify(int32_t msgType, int32_t ext1, int32_t ext2) } JNIEnv *env = AndroidRuntime::getJNIEnv(); env->CallStaticVoidMethod(mCameraJClass, fields.post_event, - mCameraJObjectWeak, msgType, ext1, ext2); + mCameraJObjectWeak, msgType, ext1, ext2, NULL); } void JNICameraContext::copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int msgType) |