diff options
author | John Reck <jreck@google.com> | 2014-12-09 09:07:35 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-12-09 12:35:12 -0800 |
commit | c47c98be04d602f331e0ea9704d2c11f8c53852d (patch) | |
tree | c6a66e5ed45b85915ed7f902210b8d379b8d53ee /core/jni | |
parent | 6ef76c60df9e68950721f92a14c77a3ecd13607c (diff) | |
download | frameworks_base-c47c98be04d602f331e0ea9704d2c11f8c53852d.zip frameworks_base-c47c98be04d602f331e0ea9704d2c11f8c53852d.tar.gz frameworks_base-c47c98be04d602f331e0ea9704d2c11f8c53852d.tar.bz2 |
Fix issue with RNA destruction mid-animation
Bug: 18521508
Fix an issue where an RNA's native object was destroyed
before the java-side object was started
Change-Id: I487fb476e0ecdf7000515f4f7320e8cfbc50a52b
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android_view_RenderNodeAnimator.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/jni/android_view_RenderNodeAnimator.cpp b/core/jni/android_view_RenderNodeAnimator.cpp index 311882d..eb56639 100644 --- a/core/jni/android_view_RenderNodeAnimator.cpp +++ b/core/jni/android_view_RenderNodeAnimator.cpp @@ -177,9 +177,13 @@ static void setAllowRunningAsync(JNIEnv* env, jobject clazz, jlong animatorPtr, animator->setAllowRunningAsync(mayRunAsync); } -static void start(JNIEnv* env, jobject clazz, jlong animatorPtr, jobject finishListener) { +static void setListener(JNIEnv* env, jobject clazz, jlong animatorPtr, jobject finishListener) { BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr); animator->setListener(new AnimationListenerBridge(env, finishListener)); +} + +static void start(JNIEnv* env, jobject clazz, jlong animatorPtr) { + BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr); animator->start(); } @@ -208,7 +212,8 @@ static JNINativeMethod gMethods[] = { { "nSetStartDelay", "(JJ)V", (void*) setStartDelay }, { "nSetInterpolator", "(JJ)V", (void*) setInterpolator }, { "nSetAllowRunningAsync", "(JZ)V", (void*) setAllowRunningAsync }, - { "nStart", "(JLandroid/view/RenderNodeAnimator;)V", (void*) start }, + { "nSetListener", "(JLandroid/view/RenderNodeAnimator;)V", (void*) setListener}, + { "nStart", "(J)V", (void*) start}, { "nEnd", "(J)V", (void*) end }, #endif }; |