From 1288d6a5df6f8ebd17bc4abea1db330a4357ab5a Mon Sep 17 00:00:00 2001 From: Ray San Date: Mon, 2 Oct 2017 13:06:34 +0200 Subject: [PATCH] Updated android_native_app_glue --- src/external/android/native_app_glue/Android.mk | 10 ---------- .../android/native_app_glue/android_native_app_glue.c | 5 +++-- .../android/native_app_glue/android_native_app_glue.h | 9 +++++++-- 3 files changed, 10 insertions(+), 14 deletions(-) delete mode 100644 src/external/android/native_app_glue/Android.mk diff --git a/src/external/android/native_app_glue/Android.mk b/src/external/android/native_app_glue/Android.mk deleted file mode 100644 index 00252fcb0..000000000 --- a/src/external/android/native_app_glue/Android.mk +++ /dev/null @@ -1,10 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE:= android_native_app_glue -LOCAL_SRC_FILES:= android_native_app_glue.c -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) -LOCAL_EXPORT_LDLIBS := -llog - -include $(BUILD_STATIC_LIBRARY) diff --git a/src/external/android/native_app_glue/android_native_app_glue.c b/src/external/android/native_app_glue/android_native_app_glue.c index d503d8dad..7eada0866 100644 --- a/src/external/android/native_app_glue/android_native_app_glue.c +++ b/src/external/android/native_app_glue/android_native_app_glue.c @@ -420,8 +420,9 @@ static void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue) android_app_set_input((struct android_app*)activity->instance, NULL); } -void ANativeActivity_onCreate(ANativeActivity* activity, - void* savedState, size_t savedStateSize) { +JNIEXPORT +void ANativeActivity_onCreate(ANativeActivity* activity, void* savedState, + size_t savedStateSize) { LOGV("Creating: %p\n", activity); activity->callbacks->onDestroy = onDestroy; activity->callbacks->onStart = onStart; diff --git a/src/external/android/native_app_glue/android_native_app_glue.h b/src/external/android/native_app_glue/android_native_app_glue.h index 97202e094..c99d6e12a 100644 --- a/src/external/android/native_app_glue/android_native_app_glue.h +++ b/src/external/android/native_app_glue/android_native_app_glue.h @@ -332,9 +332,14 @@ void android_app_pre_exec_cmd(struct android_app* android_app, int8_t cmd); void android_app_post_exec_cmd(struct android_app* android_app, int8_t cmd); /** - * Dummy function you can call to ensure glue code isn't stripped. + * Dummy function that used to be used to prevent the linker from stripping app + * glue code. No longer necessary, since __attribute__((visibility("default"))) + * does this for us. */ -void app_dummy(); +__attribute__(( + deprecated("Calls to app_dummy are no longer necessary. See " + "https://github.com/android-ndk/ndk/issues/381."))) void +app_dummy(); /** * This is the function that application code must implement, representing