Index: platform_tools/android/third_party/native_app_glue/android_native_app_glue.c |
diff --git a/platform_tools/android/third_party/native_app_glue/android_native_app_glue.c b/platform_tools/android/third_party/native_app_glue/android_native_app_glue.c |
index 55a52bc0e8e3f8b1eba0483edf2f7ad21ec95569..595bc763477e6faf45eb5d353600cb358ce4b027 100644 |
--- a/platform_tools/android/third_party/native_app_glue/android_native_app_glue.c |
+++ b/platform_tools/android/third_party/native_app_glue/android_native_app_glue.c |
@@ -419,6 +419,13 @@ static void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue) |
android_app_set_input((struct android_app*)activity->instance, NULL); |
} |
+static void onContentRectChanged(ANativeActivity* activity, const ARect* rect) { |
+ struct android_app* android_app = (struct android_app*)activity->instance; |
+ LOGV("OnContentRectChanged: %p\n", activity); |
+ android_app->contentRect = *rect; |
+ android_app_write_cmd(android_app, APP_CMD_CONTENT_RECT_CHANGED); |
+} |
+ |
void ANativeActivity_onCreate(ANativeActivity* activity, |
void* savedState, size_t savedStateSize) { |
LOGV("Creating: %p\n", activity); |
@@ -435,6 +442,7 @@ void ANativeActivity_onCreate(ANativeActivity* activity, |
activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyed; |
activity->callbacks->onInputQueueCreated = onInputQueueCreated; |
activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyed; |
+ activity->callbacks->onContentRectChanged = onContentRectChanged; |
activity->instance = android_app_create(activity, savedState, savedStateSize); |
} |