diff options
author | Jiyong Park <jiyong@google.com> | 2018-02-14 16:26:04 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2018-02-14 16:29:28 +0900 |
commit | f11feb4745fda418f31ebbbbf6933dd43d9b0691 (patch) | |
tree | 21bfb463a423105c3b7c8b7a7506c504a9e5e9ab /core/tests/hosttests | |
parent | d1134525fc506783c9d7e94fee6e5379b92f2038 (diff) |
Fix link-type check warning on PMTest_Java* test apps
The test apps are built with SDK, but are using native libraries built
without SDK (libpmtest(32|64|dual)). This has been causing link-type check
warning, which will be errors soon.
Fixing the warning by building the native libraries with SDK.
Bug: 69899800
Test: mma -j under
frameworks/base/core/tests/hosttests/test-apps/SharedUid is successful
and does not show any link-type check warning
Change-Id: I660edb9accd8965ddd471f88f2b47f6b7285b83f
Diffstat (limited to 'core/tests/hosttests')
6 files changed, 17 insertions, 19 deletions
diff --git a/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.mk b/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.mk index 994131a22ab3..9b9e8113f234 100644 --- a/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.mk +++ b/core/tests/hosttests/test-apps/SharedUid/32/jni/Android.mk @@ -29,13 +29,10 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES:= \ native.cpp -# All of the shard libraries we link against. -LOCAL_SHARED_LIBRARIES := liblog +LOCAL_LDLIBS := -llog LOCAL_CFLAGS += -Wall -Wextra -Werror -# Also need the JNI headers. -LOCAL_C_INCLUDES += \ - $(JNI_H_INCLUDE) +LOCAL_SDK_VERSION := current include $(BUILD_SHARED_LIBRARY) diff --git a/core/tests/hosttests/test-apps/SharedUid/32/jni/native.cpp b/core/tests/hosttests/test-apps/SharedUid/32/jni/native.cpp index 99cf587af2a6..fe32454aa10d 100644 --- a/core/tests/hosttests/test-apps/SharedUid/32/jni/native.cpp +++ b/core/tests/hosttests/test-apps/SharedUid/32/jni/native.cpp @@ -15,12 +15,15 @@ */ #define LOG_TAG "pmtest32 native.cpp" -#include <utils/Log.h> +#include <android/log.h> #include <stdio.h> #include "jni.h" +#define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) +#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) + static jint add(JNIEnv */* env */, jobject /* thiz */, jint a, jint b) { int result = a + b; diff --git a/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.mk b/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.mk index 6c2679b30bfb..600a5d148740 100644 --- a/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.mk +++ b/core/tests/hosttests/test-apps/SharedUid/64/jni/Android.mk @@ -30,14 +30,10 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES:= \ native.cpp -# All of the shared libraries we link against. -LOCAL_SHARED_LIBRARIES := \ - libutils liblog +LOCAL_LDLIBS := -llog LOCAL_CFLAGS += -Wall -Wextra -Werror -# Also need the JNI headers. -LOCAL_C_INCLUDES += \ - $(JNI_H_INCLUDE) +LOCAL_SDK_VERSION := current include $(BUILD_SHARED_LIBRARY) diff --git a/core/tests/hosttests/test-apps/SharedUid/64/jni/native.cpp b/core/tests/hosttests/test-apps/SharedUid/64/jni/native.cpp index 0b6d7501dcae..ad9e7469d1b8 100644 --- a/core/tests/hosttests/test-apps/SharedUid/64/jni/native.cpp +++ b/core/tests/hosttests/test-apps/SharedUid/64/jni/native.cpp @@ -15,12 +15,15 @@ */ #define LOG_TAG "pmtest64 native.cpp" -#include <utils/Log.h> +#include <android/log.h> #include <stdio.h> #include "jni.h" +#define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) +#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) + static jint add(JNIEnv */* env */, jobject /* thiz */, jint a, jint b) { int result = a + b; diff --git a/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.mk b/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.mk index d668f29456c8..8e9ac6b5de95 100644 --- a/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.mk +++ b/core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.mk @@ -29,14 +29,10 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES:= \ native.cpp -# All of the shard libraries we link against. LOCAL_LDLIBS = -llog -LOCAL_SHARED_LIBRARIES := liblog LOCAL_CFLAGS += -Wall -Wextra -Werror -# Also need the JNI headers. -LOCAL_C_INCLUDES += \ - $(JNI_H_INCLUDE) +LOCAL_SDK_VERSION := current include $(BUILD_SHARED_LIBRARY) diff --git a/core/tests/hosttests/test-apps/SharedUid/dual/jni/native.cpp b/core/tests/hosttests/test-apps/SharedUid/dual/jni/native.cpp index 3947e21a77bd..5c5088f40a94 100644 --- a/core/tests/hosttests/test-apps/SharedUid/dual/jni/native.cpp +++ b/core/tests/hosttests/test-apps/SharedUid/dual/jni/native.cpp @@ -15,12 +15,15 @@ */ #define LOG_TAG "pmtestdual native.cpp" -#include <utils/Log.h> +#include <android/log.h> #include <stdio.h> #include "jni.h" +#define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) +#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) + static jint add(JNIEnv */* env */, jobject /* thiz */, jint a, jint b) { int result = a + b; |