Fix link-type warning on GL2JNI

An sdk app GL2JNI uses a native:platform library libgl2jni, which causes
a link-type warning. Actually libutils is the only platform library used
by libgl2jni, and the warning can be eliminated by rewriting code not to
use libutils and setting LOCAL_SDK_VERSION.

Bug: 73907534
Test: mma -j does not show any link-type warnings
Merged-In: I76cb1ea579a7cf091852cd3f7ceadb781d33ea4a
Change-Id: I76cb1ea579a7cf091852cd3f7ceadb781d33ea4a
diff --git a/opengl/tests/gl2_jni/Android.mk b/opengl/tests/gl2_jni/Android.mk
index af65b5f..b0081c2 100644
--- a/opengl/tests/gl2_jni/Android.mk
+++ b/opengl/tests/gl2_jni/Android.mk
@@ -37,13 +37,13 @@
   gl_code.cpp
 
 LOCAL_SHARED_LIBRARIES := \
-	libutils \
 	liblog \
 	libEGL \
 	libGLESv2
 
 LOCAL_MODULE := libgl2jni
 
+LOCAL_SDK_VERSION := current
 
 
 include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/tests/gl2_jni/jni/gl_code.cpp b/opengl/tests/gl2_jni/jni/gl_code.cpp
index 5af4f6b..9b22c6c 100644
--- a/opengl/tests/gl2_jni/jni/gl_code.cpp
+++ b/opengl/tests/gl2_jni/jni/gl_code.cpp
@@ -2,7 +2,12 @@
 
 #include <jni.h>
 #define LOG_TAG "GL2JNI gl_code.cpp"
-#include <utils/Log.h>
+#include <android/log.h>
+
+#define ALOG(priority, tag, ...) ((void)__android_log_print(ANDROID_##priority, tag, __VA_ARGS__))
+
+#define ALOGI(...) ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)
+#define ALOGE(...) ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__)
 
 #include <EGL/egl.h>
 #include <GLES2/gl2.h>