OSDN Git Service

ndk: fix samples compilation
authorDavid 'Digit' Turner <digit@google.com>
Fri, 16 Jul 2010 21:52:50 +0000 (14:52 -0700)
committerDavid 'Digit' Turner <digit@google.com>
Sat, 17 Jul 2010 16:00:01 +0000 (09:00 -0700)
Change-Id: I3e0f88f823c891cea5ca3f82f7c3a6284295425c

ndk/samples/native-activity/jni/main.c
ndk/samples/native-plasma/jni/plasma.c
ndk/samples/test-libstdc++/jni/Android.mk
ndk/samples/test-libstdc++/jni/test-libstl.cpp

index 83f55a9..4807fd9 100644 (file)
@@ -136,7 +136,7 @@ static int engine_do_ui_event(struct engine* engine) {
         if (AInputQueue_preDispatchEvent(engine->app->inputQueue, event)) {
             return 1;
         }
-        if (AInputEvent_getType(event) == INPUT_EVENT_TYPE_MOTION) {
+        if (AInputEvent_getType(event) == AINPUT_EVENT_TYPE_MOTION) {
             engine->animating = 1;
             engine->x = AMotionEvent_getX(event, 0);
             engine->y = AMotionEvent_getY(event, 0);
index 90d6bd7..6cf8b8e 100644 (file)
@@ -417,10 +417,10 @@ static int engine_do_ui_event(struct engine* engine) {
         if (AInputQueue_preDispatchEvent(engine->app->inputQueue, event)) {
             return 1;
         }
-        if (AInputEvent_getType(event) == INPUT_EVENT_TYPE_MOTION) {
+        if (AInputEvent_getType(event) == AINPUT_EVENT_TYPE_MOTION) {
             engine->animating = 1;
             AInputQueue_finishEvent(engine->app->inputQueue, event, 1);
-        } else if (AInputEvent_getType(event) == INPUT_EVENT_TYPE_KEY) {
+        } else if (AInputEvent_getType(event) == AINPUT_EVENT_TYPE_KEY) {
             LOGI("Key event: action=%d keyCode=%d metaState=0x%x",
                     AKeyEvent_getAction(event),
                     AKeyEvent_getKeyCode(event),
index 1cf376c..ba83acf 100644 (file)
@@ -6,7 +6,4 @@ LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 LOCAL_MODULE := test-libstl
 LOCAL_SRC_FILES := test-libstl.cpp
-LOCAL_STATIC_LIBRARIES := libstdc++
 include $(BUILD_EXECUTABLE)
-
-include $(NDK_ROOT)/sources/cpp-stl/minimal/Android.mk
index f5d1262..f9cedb0 100644 (file)
@@ -1,3 +1,8 @@
 #include <cerrno>
 #include <cstddef>
 
+int main(void)
+{
+    return 0;
+}
+