Replace cutils/log.h and rationalize log/log.h and android/log.h
- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if required
- add system includes that are assumed as side effects of log.h
- modules that use SLOG should use SLOG for all logging (installd)
- define LOG_TAG first
- remove logging infrastructure if not used
Test: build
Bug: 31289077
Change-Id: Iea147a0104c7ab7f12451304131d6500f42141e7
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index c1efd1c..bb20409 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -18,16 +18,16 @@
#include <assert.h>
#include <atomic>
#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/mman.h>
+#include <unistd.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include <utils/threads.h>
#include <ui/ANativeObjectBase.h>
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 49f501d..d6dcf67 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -15,15 +15,15 @@
*/
#include <ctype.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <dlfcn.h>
-#include <limits.h>
#include <dirent.h>
+#include <dlfcn.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/properties.h>
#include <EGL/egl.h>
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 18cf261..4245a92 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -24,7 +24,7 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/atomic.h>
#include <cutils/properties.h>
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 5875860..b3c6a88 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -16,8 +16,8 @@
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
-#include <dlfcn.h>
#include <ctype.h>
+#include <dlfcn.h>
#include <stdlib.h>
#include <string.h>
@@ -27,11 +27,11 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/atomic.h>
#include <cutils/compiler.h>
-#include <cutils/properties.h>
#include <cutils/memory.h>
+#include <cutils/properties.h>
#include <gui/ISurfaceComposer.h>
diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp
index f3739aa..1257004 100644
--- a/opengl/libs/EGL/egl_tls.cpp
+++ b/opengl/libs/EGL/egl_tls.cpp
@@ -14,10 +14,10 @@
** limitations under the License.
*/
-#include <stdlib.h>
#include <pthread.h>
+#include <stdlib.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/properties.h>
#include <utils/CallStack.h>
@@ -26,7 +26,6 @@
#include "egl_tls.h"
-
namespace android {
pthread_key_t egl_tls_t::sKey = TLS_KEY_NOT_INITIALIZED;
diff --git a/opengl/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp
index 336c264..450c402 100644
--- a/opengl/libs/EGL/getProcAddress.cpp
+++ b/opengl/libs/EGL/getProcAddress.cpp
@@ -15,10 +15,10 @@
*/
#include <ctype.h>
-#include <stdlib.h>
#include <errno.h>
+#include <stdlib.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include "egldefs.h"
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index 6dd87c2..c206041 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -15,12 +15,11 @@
*/
#include <ctype.h>
-#include <string.h>
#include <errno.h>
-
+#include <string.h>
#include <sys/ioctl.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/properties.h>
#include "../hooks.h"
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index 8bde4e5..e698fcd 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -1,31 +1,30 @@
-/*
+/*
** Copyright 2007, The Android Open Source Project
**
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
+ ** Licensed under the Apache License, Version 2.0 (the "License");
+ ** you may not use this file except in compliance with the License.
+ ** You may obtain a copy of the License at
**
- ** http://www.apache.org/licenses/LICENSE-2.0
+ ** http://www.apache.org/licenses/LICENSE-2.0
**
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
+ ** Unless required by applicable law or agreed to in writing, software
+ ** distributed under the License is distributed on an "AS IS" BASIS,
+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ** See the License for the specific language governing permissions and
** limitations under the License.
*/
#include <ctype.h>
-#include <string.h>
#include <errno.h>
-
+#include <string.h>
#include <sys/ioctl.h>
+#include <android/log.h>
+#include <cutils/properties.h>
+
#include <GLES/gl.h>
#include <GLES/glext.h>
-#include <cutils/log.h>
-#include <cutils/properties.h>
-
#include "../hooks.h"
#include "../egl_impl.h"