diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-07-01 18:44:46 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-07-01 18:44:46 -0700 |
commit | 8ae5a8e7c04c7b204b739dfcd5da9e2e0f83e1eb (patch) | |
tree | 3967411cd4a849e239a6c79425e90de101c0caf4 /core/jni | |
parent | f520411a35db5248934a4b50859ca72e3f865593 (diff) | |
download | frameworks_base-8ae5a8e7c04c7b204b739dfcd5da9e2e0f83e1eb.zip frameworks_base-8ae5a8e7c04c7b204b739dfcd5da9e2e0f83e1eb.tar.gz frameworks_base-8ae5a8e7c04c7b204b739dfcd5da9e2e0f83e1eb.tar.bz2 |
Get to the point of being able to do native drawing.
A little cleanup.
Change-Id: I37ef0557abf330d91d6fe47e81d062206b3bc346
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android_app_NativeActivity.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp index 49b9609..dab1dba 100644 --- a/core/jni/android_app_NativeActivity.cpp +++ b/core/jni/android_app_NativeActivity.cpp @@ -362,8 +362,12 @@ onSurfaceChanged_native(JNIEnv* env, jobject clazz, jint handle, jobject surface sp<ANativeWindow> oldNativeWindow = code->nativeWindow; code->setSurface(surface); if (oldNativeWindow != code->nativeWindow) { - if (code->nativeWindow != NULL && code->callbacks.onNativeWindowChanged != NULL) { - code->callbacks.onNativeWindowChanged(&code->activity, + if (oldNativeWindow != NULL && code->callbacks.onNativeWindowDestroyed != NULL) { + code->callbacks.onNativeWindowDestroyed(&code->activity, + oldNativeWindow.get()); + } + if (code->nativeWindow != NULL && code->callbacks.onNativeWindowCreated != NULL) { + code->callbacks.onNativeWindowCreated(&code->activity, code->nativeWindow.get()); } } |