diff options
author | Chih-Chung Chang <chihchung@google.com> | 2009-09-24 15:29:35 -0700 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2009-12-01 14:27:03 +0800 |
commit | cfd78ff5fc7f41b4e4abc04d3690d347644e0bdb (patch) | |
tree | 64aa5ace784ec8d564ed747c9335cb3b074978b3 | |
parent | 01889503c47aadc9faacf727371f1d23e3a99d97 (diff) | |
download | base-cfd78ff5fc7f41b4e4abc04d3690d347644e0bdb.tar.gz |
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.
Cherry-pick from Eclair.
-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 9053468cebbf..d9b6e7b5f94d 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) |