From a7d5ca6b2eaaa5a1c7766dea477c0d6c795b3721 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Fri, 19 Apr 2013 16:28:42 -0700 Subject: [PATCH] Stop errors being logged erroneously on event predispatch Change-Id: Ie4d15a7d01b9d63e7db16a2701024e6108eb0cc0 --- .../android/native_app_glue/android_native_app_glue.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ndk/sources/android/native_app_glue/android_native_app_glue.c b/ndk/sources/android/native_app_glue/android_native_app_glue.c index 0c526fa84..55a52bc0e 100644 --- a/ndk/sources/android/native_app_glue/android_native_app_glue.c +++ b/ndk/sources/android/native_app_glue/android_native_app_glue.c @@ -186,7 +186,6 @@ static void android_app_destroy(struct android_app* android_app) { static void process_input(struct android_app* app, struct android_poll_source* source) { AInputEvent* event = NULL; - int processed = 0; while (AInputQueue_getEvent(app->inputQueue, &event) >= 0) { LOGV("New input event: type=%d\n", AInputEvent_getType(event)); if (AInputQueue_preDispatchEvent(app->inputQueue, event)) { @@ -195,10 +194,6 @@ static void process_input(struct android_app* app, struct android_poll_source* s int32_t handled = 0; if (app->onInputEvent != NULL) handled = app->onInputEvent(app, event); AInputQueue_finishEvent(app->inputQueue, event, handled); - processed = 1; - } - if (processed == 0) { - LOGE("Failure reading next input event: %s\n", strerror(errno)); } }