android: change include "cutils/log.h" to "log/log.h" on Android API >=26
authorjenny.q.cao <jenny.q.cao@intel.com>
Fri, 27 Apr 2018 02:11:36 +0000 (10:11 +0800)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 14 May 2018 05:08:31 +0000 (08:08 +0300)
There is a compile warning from Android 8 (API version 26) from "include cutils/log.h"
warning: "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h"-W#warnings,
Change to include "log/log.h" on Android 8 or later major version to avoid this warning

Signed-off-by: jenny.q.cao <jenny.q.cao@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/broadcom/common/v3d_debug.h
src/egl/main/egllog.c
src/intel/common/gen_debug.h
src/mesa/drivers/dri/i915/intel_context.h

index bdb9518548cc0177dbcc3d79472b524e247c86d4..75eb2718f30c7fec854e8a121ffb9495f3cd2da3 100644 (file)
@@ -57,7 +57,11 @@ extern uint32_t V3D_DEBUG;
 
 #ifdef HAVE_ANDROID_PLATFORM
 #define LOG_TAG "BROADCOM-MESA"
+#if ANDROID_API_LEVEL >= 26
+#include <log/log.h>
+#else
 #include <cutils/log.h>
+#endif /* use log/log.h start from android 8 major version */
 #ifndef ALOGW
 #define ALOGW LOGW
 #endif
index 64ff474c65c46078f9e5b7f53f4b5701b3832cae..c223f49b0fed1e0e71cfb06aa56f597b84b22f42 100644 (file)
 
 #ifdef HAVE_ANDROID_PLATFORM
 #define LOG_TAG "EGL-MAIN"
+#if ANDROID_API_LEVEL >= 26
+#include <log/log.h>
+#else
 #include <cutils/log.h>
+#endif /* use log/log.h start from android 8 major version */
 
 #endif /* HAVE_ANDROID_PLATFORM */
 
index da5b5a569d191b30cc53d21aa9e27ea179c63f1b..f6c44eeb912100090bf71b0e457e71c18c1260fa 100644 (file)
@@ -86,7 +86,11 @@ extern uint64_t INTEL_DEBUG;
 
 #ifdef HAVE_ANDROID_PLATFORM
 #define LOG_TAG "INTEL-MESA"
+#if ANDROID_API_LEVEL >= 26
+#include <log/log.h>
+#else
 #include <cutils/log.h>
+#endif /* use log/log.h start from android 8 major version */
 #ifndef ALOGW
 #define ALOGW LOGW
 #endif
index a219c7fb1dcd7c9f01b3ca8921e85fa23249c3cc..a8339896f65f270904b4e7a05b3976edf67737b7 100644 (file)
@@ -284,7 +284,11 @@ extern int INTEL_DEBUG;
 
 #ifdef HAVE_ANDROID_PLATFORM
 #define LOG_TAG "INTEL-MESA"
+#if ANDROID_API_LEVEL >= 26
+#include <log/log.h>
+#else
 #include <cutils/log.h>
+#endif /* use log/log.h start from android 8 major version */
 #ifndef ALOGW
 #define ALOGW LOGW
 #endif