From 0755b6b5794363d25de3f6c7c1ae9b987a1ed0e0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 1 Jan 2013 03:44:38 +0100 Subject: [PATCH] (Android) Remove remnants of savedState glue code --- android/native/jni/android_glue.h | 16 +--------------- android/native/jni/main.c | 7 ------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/android/native/jni/android_glue.h b/android/native/jni/android_glue.h index 592191010b..0ead8e4076 100644 --- a/android/native/jni/android_glue.h +++ b/android/native/jni/android_glue.h @@ -32,17 +32,6 @@ struct android_app ANativeActivity* activity; AConfiguration* config; - // This is the last instance's saved state, as provided at creation time. - // It is NULL if there was no state. You can use this as you need; the - // memory will remain around until you call android_app_exec_cmd() for - // APP_CMD_RESUME, at which point it will be freed and savedState set to NULL. - // These variables should only be changed when processing a APP_CMD_SAVE_STATE, - // at which point they will be initialized to NULL and you can malloc your - // state and place the information here. In that case the memory will be - // freed for you later. - void* savedState; - size_t savedStateSize; - ALooper* looper; AInputQueue* inputQueue; @@ -144,10 +133,7 @@ enum { /** * Command from main thread: the app should generate a new saved state - * for itself, to restore from later if needed. If you have saved state, - * allocate it with malloc and place it in android_app.savedState with - * the size in android_app.savedStateSize. The will be freed for you - * later. + * for itself, to restore from later if needed. */ APP_CMD_SAVE_STATE, diff --git a/android/native/jni/main.c b/android/native/jni/main.c index 40f6e6d1dc..4ed40fc5c2 100644 --- a/android/native/jni/main.c +++ b/android/native/jni/main.c @@ -568,13 +568,6 @@ void ANativeActivity_onCreate(ANativeActivity* activity, pthread_mutex_init(&android_app->mutex, NULL); pthread_cond_init(&android_app->cond, NULL); - if (savedState != NULL) - { - android_app->savedState = malloc(savedStateSize); - android_app->savedStateSize = savedStateSize; - memcpy(android_app->savedState, savedState, savedStateSize); - } - int msgpipe[2]; if (pipe(msgpipe)) {