summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-07-01 19:26:57 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-07-01 19:26:57 -0700
commit4847e630e5e740f6bf0e87b3cccbb655346edcb7 (patch)
tree42008f8882311fe1b984009bcc0247d055ebdb07 /core/jni
parentcc08bb8884d7ab720296cc63f8098249659c48b1 (diff)
parent39c921c6e5316696d8c61d1ee465f9b5f894c4ed (diff)
downloadframeworks_base-4847e630e5e740f6bf0e87b3cccbb655346edcb7.zip
frameworks_base-4847e630e5e740f6bf0e87b3cccbb655346edcb7.tar.gz
frameworks_base-4847e630e5e740f6bf0e87b3cccbb655346edcb7.tar.bz2
am 39c921c6: am 8ae5a8e7: Get to the point of being able to do native drawing.
Merge commit '39c921c6e5316696d8c61d1ee465f9b5f894c4ed' * commit '39c921c6e5316696d8c61d1ee465f9b5f894c4ed': Get to the point of being able to do native drawing.
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_app_NativeActivity.cpp8
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());
}
}