summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2016-09-30 22:12:55 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-09-30 22:12:55 +0000
commit16f77860326dbcc9a34e0b7e3eab3ca8a2027e76 (patch)
tree0f417f50301198522f842d42e361442158e4f6a6
parenta8d0a469566d462dad94e78c3f7582489b0568ac (diff)
parenteb189f147b701315bfacf7fdc4338b9153964ed1 (diff)
downloadsystem_core-16f77860326dbcc9a34e0b7e3eab3ca8a2027e76.tar.gz
system_core-16f77860326dbcc9a34e0b7e3eab3ca8a2027e76.tar.bz2
system_core-16f77860326dbcc9a34e0b7e3eab3ca8a2027e76.zip
system/core Replace cutils/log.h with android/log.h am: 66ce3e08c5
am: eb189f147b Change-Id: I3f2b13e259d9bbb7bc714f21eab7181fa72c35bf
-rw-r--r--adf/libadfhwc/adfhwc.cpp6
-rw-r--r--debuggerd/getevent.cpp16
-rw-r--r--fingerprintd/fingerprintd.cpp13
-rw-r--r--gatekeeperd/gatekeeperd.cpp17
-rw-r--r--include/utils/KeyedVector.h5
-rw-r--r--include/utils/Log.h3
-rw-r--r--include/utils/SortedVector.h5
-rw-r--r--include/utils/Vector.h6
-rw-r--r--libdiskconfig/config_mbr.c7
-rw-r--r--libdiskconfig/dump_diskconfig.c3
-rw-r--r--libdiskconfig/write_lst.c6
-rw-r--r--libion/ion.c4
-rw-r--r--libnativebridge/native_bridge.cc5
-rw-r--r--libnativebridge/tests/PreInitializeNativeBridgeFail1_test.cpp8
-rw-r--r--libnativebridge/tests/PreInitializeNativeBridgeFail2_test.cpp12
-rw-r--r--libnativebridge/tests/PreInitializeNativeBridge_test.cpp12
-rw-r--r--libnetutils/dhcpclient.c26
-rw-r--r--libnetutils/ifc_utils.c50
-rw-r--r--libnetutils/packet.c29
-rw-r--r--libpackagelistparser/packagelistparser.c7
-rw-r--r--libpixelflinger/codeflinger/ARMAssembler.cpp20
-rw-r--r--libpixelflinger/codeflinger/ARMAssemblerInterface.cpp22
-rw-r--r--libpixelflinger/codeflinger/Arm64Assembler.cpp5
-rw-r--r--libpixelflinger/codeflinger/CodeCache.cpp7
-rw-r--r--libpixelflinger/codeflinger/GGLAssembler.cpp21
-rw-r--r--libpixelflinger/codeflinger/MIPS64Assembler.cpp7
-rw-r--r--libpixelflinger/codeflinger/MIPSAssembler.cpp6
-rw-r--r--libpixelflinger/codeflinger/blending.cpp21
-rw-r--r--libpixelflinger/codeflinger/load_store.cpp52
-rw-r--r--libpixelflinger/codeflinger/mips64_disassem.c11
-rw-r--r--libpixelflinger/codeflinger/texturing.cpp20
-rw-r--r--libpixelflinger/scanline.cpp21
-rw-r--r--libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp12
-rw-r--r--libpixelflinger/trap.cpp22
-rw-r--r--libsuspend/autosuspend.c5
-rw-r--r--libsuspend/autosuspend_autosleep.c5
-rw-r--r--libsuspend/autosuspend_earlysuspend.c7
-rw-r--r--libsuspend/autosuspend_wakeup_count.c7
-rw-r--r--libsysutils/src/FrameworkClient.cpp24
-rw-r--r--libsysutils/src/FrameworkCommand.cpp4
-rw-r--r--libsysutils/src/FrameworkListener.cpp10
-rw-r--r--libsysutils/src/NetlinkEvent.cpp31
-rw-r--r--libsysutils/src/NetlinkListener.cpp15
-rw-r--r--libsysutils/src/ServiceManager.cpp24
-rw-r--r--libsysutils/src/SocketClient.cpp24
-rw-r--r--libsysutils/src/SocketListener.cpp11
-rw-r--r--libutils/Looper.cpp9
-rw-r--r--libutils/VectorImpl.cpp10
-rw-r--r--libutils/tests/BitSet_test.cpp7
-rw-r--r--libutils/tests/LruCache_test.cpp5
-rw-r--r--libutils/tests/Vector_test.cpp7
-rw-r--r--logwrapper/logwrap.c24
-rw-r--r--logwrapper/logwrapper.c5
-rw-r--r--trusty/gatekeeper/trusty_gatekeeper.cpp9
-rw-r--r--trusty/gatekeeper/trusty_gatekeeper_ipc.c5
-rw-r--r--trusty/keymaster/trusty_keymaster_device.cpp14
-rw-r--r--trusty/keymaster/trusty_keymaster_ipc.c6
-rw-r--r--trusty/libtrusty/trusty.c2
-rw-r--r--trusty/storage/lib/storage.c6
-rw-r--r--trusty/storage/proxy/log.h3
60 files changed, 404 insertions, 362 deletions
diff --git a/adf/libadfhwc/adfhwc.cpp b/adf/libadfhwc/adfhwc.cpp
index 21f245ed0..7d5b55514 100644
--- a/adf/libadfhwc/adfhwc.cpp
+++ b/adf/libadfhwc/adfhwc.cpp
@@ -20,12 +20,12 @@
#include <pthread.h>
#include <sys/resource.h>
+#include <android/log.h>
+#include <utils/Vector.h>
+
#include <adf/adf.h>
#include <adfhwc/adfhwc.h>
-#include <cutils/log.h>
-#include <utils/Vector.h>
-
struct adf_hwc_helper {
adf_hwc_event_callbacks const *event_cb;
void *event_cb_data;
diff --git a/debuggerd/getevent.cpp b/debuggerd/getevent.cpp
index e5acd1744..dfa7bec02 100644
--- a/debuggerd/getevent.cpp
+++ b/debuggerd/getevent.cpp
@@ -14,20 +14,22 @@
* limitations under the License.
*/
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <linux/input.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdint.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
#include <sys/inotify.h>
+#include <sys/ioctl.h>
#include <sys/limits.h>
#include <sys/poll.h>
-#include <linux/input.h>
-#include <errno.h>
+
#include <memory>
-#include <cutils/log.h>
+
+#include <android/log.h>
static struct pollfd* ufds;
static char** device_names;
diff --git a/fingerprintd/fingerprintd.cpp b/fingerprintd/fingerprintd.cpp
index 8fa7ed18e..05109b7d1 100644
--- a/fingerprintd/fingerprintd.cpp
+++ b/fingerprintd/fingerprintd.cpp
@@ -16,20 +16,17 @@
#define LOG_TAG "fingerprintd"
-#include <cutils/log.h>
-#include <utils/Log.h>
-
+#include <android/log.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <binder/PermissionCache.h>
-#include <utils/String16.h>
-
-#include <keystore/IKeystoreService.h>
-#include <keystore/keystore.h> // for error codes
-
#include <hardware/hardware.h>
#include <hardware/fingerprint.h>
#include <hardware/hw_auth_token.h>
+#include <keystore/IKeystoreService.h>
+#include <keystore/keystore.h> // for error codes
+#include <utils/Log.h>
+#include <utils/String16.h>
#include "FingerprintDaemonProxy.h"
diff --git a/gatekeeperd/gatekeeperd.cpp b/gatekeeperd/gatekeeperd.cpp
index 7254cf2f3..4107f553e 100644
--- a/gatekeeperd/gatekeeperd.cpp
+++ b/gatekeeperd/gatekeeperd.cpp
@@ -19,25 +19,22 @@
#include "IGateKeeperService.h"
#include <errno.h>
-#include <stdint.h>
-#include <inttypes.h>
#include <fcntl.h>
+#include <inttypes.h>
+#include <stdint.h>
#include <unistd.h>
-#include <cutils/log.h>
-#include <utils/Log.h>
-
+#include <android/log.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <binder/PermissionCache.h>
-#include <utils/String16.h>
-#include <utils/Log.h>
-
-#include <keystore/IKeystoreService.h>
-#include <keystore/keystore.h> // For error code
#include <gatekeeper/password_handle.h> // for password_handle_t
#include <hardware/gatekeeper.h>
#include <hardware/hw_auth_token.h>
+#include <keystore/IKeystoreService.h>
+#include <keystore/keystore.h> // For error code
+#include <utils/Log.h>
+#include <utils/String16.h>
#include "SoftGateKeeperDevice.h"
#include "IUserManager.h"
diff --git a/include/utils/KeyedVector.h b/include/utils/KeyedVector.h
index 92579e25f..42de401a9 100644
--- a/include/utils/KeyedVector.h
+++ b/include/utils/KeyedVector.h
@@ -21,11 +21,10 @@
#include <stdint.h>
#include <sys/types.h>
-#include <cutils/log.h>
-
+#include <android/log.h>
+#include <utils/Errors.h>
#include <utils/SortedVector.h>
#include <utils/TypeHelpers.h>
-#include <utils/Errors.h>
// ---------------------------------------------------------------------------
diff --git a/include/utils/Log.h b/include/utils/Log.h
index 4259c86d1..6ef3fa37d 100644
--- a/include/utils/Log.h
+++ b/include/utils/Log.h
@@ -28,9 +28,10 @@
#ifndef _LIBS_UTILS_LOG_H
#define _LIBS_UTILS_LOG_H
-#include <cutils/log.h>
#include <sys/types.h>
+#include <android/log.h>
+
#ifdef __cplusplus
namespace android {
diff --git a/include/utils/SortedVector.h b/include/utils/SortedVector.h
index ea0f82c40..9f2ec021f 100644
--- a/include/utils/SortedVector.h
+++ b/include/utils/SortedVector.h
@@ -21,11 +21,10 @@
#include <stdint.h>
#include <sys/types.h>
-#include <cutils/log.h>
-
+#include <android/log.h>
+#include <utils/TypeHelpers.h>
#include <utils/Vector.h>
#include <utils/VectorImpl.h>
-#include <utils/TypeHelpers.h>
// ---------------------------------------------------------------------------
diff --git a/include/utils/Vector.h b/include/utils/Vector.h
index b6d5686ac..6c1931ed7 100644
--- a/include/utils/Vector.h
+++ b/include/utils/Vector.h
@@ -17,14 +17,14 @@
#ifndef ANDROID_VECTOR_H
#define ANDROID_VECTOR_H
-#include <new>
#include <stdint.h>
#include <sys/types.h>
-#include <cutils/log.h>
+#include <new>
-#include <utils/VectorImpl.h>
+#include <android/log.h>
#include <utils/TypeHelpers.h>
+#include <utils/VectorImpl.h>
// ---------------------------------------------------------------------------
diff --git a/libdiskconfig/config_mbr.c b/libdiskconfig/config_mbr.c
index 7b6ca1c65..1d3cd200a 100644
--- a/libdiskconfig/config_mbr.c
+++ b/libdiskconfig/config_mbr.c
@@ -16,16 +16,15 @@
*/
#define LOG_TAG "config_mbr"
+
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdio.h>
-
-#include <cutils/log.h>
+#include <android/log.h>
#include <diskconfig/diskconfig.h>
-
/* start and len are in LBA units */
static void
cfg_pentry(struct pc_partition *pentry, uint8_t status, uint8_t type,
diff --git a/libdiskconfig/dump_diskconfig.c b/libdiskconfig/dump_diskconfig.c
index 75256f616..c94e7f49e 100644
--- a/libdiskconfig/dump_diskconfig.c
+++ b/libdiskconfig/dump_diskconfig.c
@@ -16,9 +16,10 @@
*/
#define LOG_TAG "dump_diskconfig"
+
#include <stdio.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include "diskconfig.h"
diff --git a/libdiskconfig/write_lst.c b/libdiskconfig/write_lst.c
index 90b1c829a..21d4a3108 100644
--- a/libdiskconfig/write_lst.c
+++ b/libdiskconfig/write_lst.c
@@ -16,14 +16,14 @@
*/
#define LOG_TAG "write_lst"
-#include <sys/types.h>
+
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
+#include <sys/types.h>
#include <unistd.h>
-#include <cutils/log.h>
-
+#include <android/log.h>
#include <diskconfig/diskconfig.h>
struct write_list *
diff --git a/libion/ion.c b/libion/ion.c
index d1984bd06..424776a3c 100644
--- a/libion/ion.c
+++ b/libion/ion.c
@@ -19,16 +19,16 @@
*/
#define LOG_TAG "ion"
-#include <cutils/log.h>
#include <errno.h>
#include <fcntl.h>
+#include <linux/ion.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/types.h>
-#include <linux/ion.h>
+#include <android/log.h>
#include <ion/ion.h>
int ion_open()
diff --git a/libnativebridge/native_bridge.cc b/libnativebridge/native_bridge.cc
index ecfd719bc..9f9c83faf 100644
--- a/libnativebridge/native_bridge.cc
+++ b/libnativebridge/native_bridge.cc
@@ -16,8 +16,6 @@
#include "nativebridge/native_bridge.h"
-#include <cstring>
-#include <cutils/log.h>
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
@@ -25,6 +23,9 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <cstring>
+
+#include <android/log.h>
namespace android {
diff --git a/libnativebridge/tests/PreInitializeNativeBridgeFail1_test.cpp b/libnativebridge/tests/PreInitializeNativeBridgeFail1_test.cpp
index 69c30a195..5a2b0a150 100644
--- a/libnativebridge/tests/PreInitializeNativeBridgeFail1_test.cpp
+++ b/libnativebridge/tests/PreInitializeNativeBridgeFail1_test.cpp
@@ -16,9 +16,6 @@
#include "NativeBridgeTest.h"
-#include <cstdio>
-#include <cstring>
-#include <cutils/log.h>
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
@@ -26,6 +23,11 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <cstdio>
+#include <cstring>
+
+#include <android/log.h>
+
namespace android {
TEST_F(NativeBridgeTest, PreInitializeNativeBridgeFail1) {
diff --git a/libnativebridge/tests/PreInitializeNativeBridgeFail2_test.cpp b/libnativebridge/tests/PreInitializeNativeBridgeFail2_test.cpp
index 74e96e041..af976b174 100644
--- a/libnativebridge/tests/PreInitializeNativeBridgeFail2_test.cpp
+++ b/libnativebridge/tests/PreInitializeNativeBridgeFail2_test.cpp
@@ -14,11 +14,6 @@
* limitations under the License.
*/
-#include "NativeBridgeTest.h"
-
-#include <cstdio>
-#include <cstring>
-#include <cutils/log.h>
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
@@ -26,6 +21,13 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <cstdio>
+#include <cstring>
+
+#include <android/log.h>
+
+#include "NativeBridgeTest.h"
+
namespace android {
TEST_F(NativeBridgeTest, PreInitializeNativeBridgeFail2) {
diff --git a/libnativebridge/tests/PreInitializeNativeBridge_test.cpp b/libnativebridge/tests/PreInitializeNativeBridge_test.cpp
index d3bbebefd..f3e5f38cf 100644
--- a/libnativebridge/tests/PreInitializeNativeBridge_test.cpp
+++ b/libnativebridge/tests/PreInitializeNativeBridge_test.cpp
@@ -14,11 +14,6 @@
* limitations under the License.
*/
-#include "NativeBridgeTest.h"
-
-#include <cstdio>
-#include <cstring>
-#include <cutils/log.h>
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
@@ -26,6 +21,13 @@
#include <sys/mount.h>
#include <sys/stat.h>
+#include <cstdio>
+#include <cstring>
+
+#include <android/log.h>
+
+#include "NativeBridgeTest.h"
+
namespace android {
static constexpr const char* kTestData = "PreInitializeNativeBridge test.";
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c
index 240a7891e..d17bdd3c2 100644
--- a/libnetutils/dhcpclient.c
+++ b/libnetutils/dhcpclient.c
@@ -14,27 +14,25 @@
* limitations under the License.
*/
-#include <stdio.h>
+#define LOG_TAG "DHCP"
+
+#include <dirent.h>
+#include <errno.h>
+#include <poll.h>
+#include <netinet/in.h>
#include <stdarg.h>
#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
+#include <stdio.h>
#include <string.h>
-
-#include <time.h>
-#include <sys/time.h>
-#include <poll.h>
-
-#include <sys/socket.h>
#include <sys/select.h>
+#include <sys/socket.h>
+#include <sys/time.h>
#include <sys/types.h>
-#include <netinet/in.h>
+#include <time.h>
+#include <unistd.h>
+#include <android/log.h>
#include <cutils/properties.h>
-#define LOG_TAG "DHCP"
-#include <cutils/log.h>
-
-#include <dirent.h>
#include <netutils/ifc.h>
#include "dhcpmsg.h"
diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c
index eae32ce36..275327ab4 100644
--- a/libnetutils/ifc_utils.c
+++ b/libnetutils/ifc_utils.c
@@ -1,34 +1,21 @@
/*
* Copyright 2008, 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 <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include <sys/socket.h>
-#include <sys/select.h>
-#include <sys/types.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
-#include <net/if.h>
-#include <netdb.h>
-
+#include <errno.h>
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/if_arp.h>
@@ -37,20 +24,29 @@
#include <linux/ipv6_route.h>
#include <linux/rtnetlink.h>
#include <linux/sockios.h>
-
-#include "netutils/ifc.h"
+#include <net/if.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
#ifdef ANDROID
#define LOG_TAG "NetUtils"
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/properties.h>
#else
-#include <stdio.h>
-#include <string.h>
#define ALOGD printf
#define ALOGW printf
#endif
+#include "netutils/ifc.h"
+
#if defined(__ANDROID__)
/* SIOCKILLADDR is an Android extension. */
#define SIOCKILLADDR 0x8939
diff --git a/libnetutils/packet.c b/libnetutils/packet.c
index cd26d058a..56168e844 100644
--- a/libnetutils/packet.c
+++ b/libnetutils/packet.c
@@ -1,37 +1,36 @@
/*
* Copyright 2008, 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 <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <sys/uio.h>
#include <sys/socket.h>
+#include <sys/uio.h>
+#include <linux/if_ether.h>
+#include <linux/if_packet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
-#include <linux/if_packet.h>
-#include <linux/if_ether.h>
-#include <errno.h>
+#include <unistd.h>
#ifdef ANDROID
#define LOG_TAG "DHCP"
-#include <cutils/log.h>
+#include <android/log.h>
#else
#include <stdio.h>
-#include <string.h>
#define ALOGD printf
#define ALOGW printf
#endif
diff --git a/libpackagelistparser/packagelistparser.c b/libpackagelistparser/packagelistparser.c
index e3090277e..f74b8b495 100644
--- a/libpackagelistparser/packagelistparser.c
+++ b/libpackagelistparser/packagelistparser.c
@@ -18,17 +18,16 @@
*
*/
+#define LOG_TAG "packagelistparser"
+
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
#include <sys/limits.h>
-#define LOG_TAG "packagelistparser"
-#include <cutils/log.h>
-
+#include <android/log.h>
#include <packagelistparser/packagelistparser.h>
#define CLOGE(fmt, ...) \
diff --git a/libpixelflinger/codeflinger/ARMAssembler.cpp b/libpixelflinger/codeflinger/ARMAssembler.cpp
index 849512ac7..36c1326f7 100644
--- a/libpixelflinger/codeflinger/ARMAssembler.cpp
+++ b/libpixelflinger/codeflinger/ARMAssembler.cpp
@@ -2,16 +2,16 @@
**
** Copyright 2006, 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.
*/
@@ -19,9 +19,9 @@
#include <stdio.h>
#include <stdlib.h>
-#include <cutils/log.h>
-#include <cutils/properties.h>
+#include <android/log.h>
+#include <cutils/properties.h>
#include <private/pixelflinger/ggl_context.h>
#include "ARMAssembler.h"
diff --git a/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp b/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp
index 50419996e..67eba8040 100644
--- a/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp
+++ b/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp
@@ -2,26 +2,26 @@
**
** Copyright 2006, 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 <errno.h>
-#include <stdlib.h>
#include <stdint.h>
+#include <stdlib.h>
#include <sys/types.h>
-#include <cutils/log.h>
+#include <android/log.h>
+
#include "ARMAssemblerInterface.h"
namespace android {
diff --git a/libpixelflinger/codeflinger/Arm64Assembler.cpp b/libpixelflinger/codeflinger/Arm64Assembler.cpp
index bd11818c2..fb297ec27 100644
--- a/libpixelflinger/codeflinger/Arm64Assembler.cpp
+++ b/libpixelflinger/codeflinger/Arm64Assembler.cpp
@@ -32,14 +32,13 @@
#include <stdlib.h>
#include <string.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/properties.h>
#include <private/pixelflinger/ggl_context.h>
#include "codeflinger/Arm64Assembler.h"
-#include "codeflinger/CodeCache.h"
#include "codeflinger/Arm64Disassembler.h"
-
+#include "codeflinger/CodeCache.h"
/*
** --------------------------------------------
diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp
index ae3851914..37bd0744e 100644
--- a/libpixelflinger/codeflinger/CodeCache.cpp
+++ b/libpixelflinger/codeflinger/CodeCache.cpp
@@ -15,17 +15,16 @@
** limitations under the License.
*/
+#define LOG_TAG "CodeCache"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <sys/mman.h>
+#include <unistd.h>
+#include <android/log.h>
#include <cutils/ashmem.h>
-#define LOG_TAG "CodeCache"
-#include <cutils/log.h>
-
#include "CodeCache.h"
diff --git a/libpixelflinger/codeflinger/GGLAssembler.cpp b/libpixelflinger/codeflinger/GGLAssembler.cpp
index 346779f47..0b9b5a472 100644
--- a/libpixelflinger/codeflinger/GGLAssembler.cpp
+++ b/libpixelflinger/codeflinger/GGLAssembler.cpp
@@ -2,16 +2,16 @@
**
** Copyright 2006, 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.
*/
@@ -19,10 +19,11 @@
#include <assert.h>
#include <stdint.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
-#include <cutils/log.h>
+
+#include <android/log.h>
#include "GGLAssembler.h"
diff --git a/libpixelflinger/codeflinger/MIPS64Assembler.cpp b/libpixelflinger/codeflinger/MIPS64Assembler.cpp
index b9f31ff11..a7bbaf7b1 100644
--- a/libpixelflinger/codeflinger/MIPS64Assembler.cpp
+++ b/libpixelflinger/codeflinger/MIPS64Assembler.cpp
@@ -25,24 +25,21 @@
**
*/
-
#define LOG_TAG "MIPS64Assembler"
#include <stdio.h>
#include <stdlib.h>
-#include <cutils/log.h>
-#include <cutils/properties.h>
+#include <android/log.h>
+#include <cutils/properties.h>
#include <private/pixelflinger/ggl_context.h>
#include "MIPS64Assembler.h"
#include "CodeCache.h"
#include "mips64_disassem.h"
-
#define NOT_IMPLEMENTED() LOG_ALWAYS_FATAL("Arm instruction %s not yet implemented\n", __func__)
-
// ----------------------------------------------------------------------------
namespace android {
diff --git a/libpixelflinger/codeflinger/MIPSAssembler.cpp b/libpixelflinger/codeflinger/MIPSAssembler.cpp
index ae06a1344..4cddcc85b 100644
--- a/libpixelflinger/codeflinger/MIPSAssembler.cpp
+++ b/libpixelflinger/codeflinger/MIPSAssembler.cpp
@@ -52,13 +52,13 @@
#include <stdio.h>
#include <stdlib.h>
-#include <cutils/log.h>
-#include <cutils/properties.h>
+#include <android/log.h>
+#include <cutils/properties.h>
#include <private/pixelflinger/ggl_context.h>
-#include "MIPSAssembler.h"
#include "CodeCache.h"
+#include "MIPSAssembler.h"
#include "mips_disassem.h"
// Choose MIPS arch variant following gcc flags
diff --git a/libpixelflinger/codeflinger/blending.cpp b/libpixelflinger/codeflinger/blending.cpp
index b20219ced..d4aa47538 100644
--- a/libpixelflinger/codeflinger/blending.cpp
+++ b/libpixelflinger/codeflinger/blending.cpp
@@ -2,30 +2,29 @@
**
** Copyright 2006, 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 <assert.h>
#include <stdint.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include "GGLAssembler.h"
-
namespace android {
void GGLAssembler::build_fog(
diff --git a/libpixelflinger/codeflinger/load_store.cpp b/libpixelflinger/codeflinger/load_store.cpp
index e5a1ae010..d68f6dc73 100644
--- a/libpixelflinger/codeflinger/load_store.cpp
+++ b/libpixelflinger/codeflinger/load_store.cpp
@@ -2,22 +2,24 @@
**
** Copyright 2006, 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 <assert.h>
#include <stdio.h>
-#include <cutils/log.h>
+
+#include <android/log.h>
+
#include "GGLAssembler.h"
namespace android {
@@ -25,7 +27,7 @@ namespace android {
// ----------------------------------------------------------------------------
void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags)
-{
+{
const int bits = addr.size;
const int inc = (flags & WRITE_BACK)?1:0;
switch (bits) {
@@ -59,8 +61,8 @@ void GGLAssembler::store(const pointer_t& addr, const pixel_t& s, uint32_t flags
}
void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags)
-{
- Scratch scratches(registerFile());
+{
+ Scratch scratches(registerFile());
int s0;
const int bits = addr.size;
@@ -72,7 +74,7 @@ void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags)
break;
case 24:
// 24 bits formats are a little special and used only for RGB
- // R,G,B is packed as 0x00BBGGRR
+ // R,G,B is packed as 0x00BBGGRR
s0 = scratches.obtain();
if (s.reg != addr.reg) {
LDRB(AL, s.reg, addr.reg, immed12_pre(0)); // R
@@ -90,7 +92,7 @@ void GGLAssembler::load(const pointer_t& addr, const pixel_t& s, uint32_t flags)
}
if (inc)
ADD(AL, 0, addr.reg, addr.reg, imm(3));
- break;
+ break;
case 16:
if (inc) LDRH(AL, s.reg, addr.reg, immed8_post(2));
else LDRH(AL, s.reg, addr.reg);
@@ -112,7 +114,7 @@ void GGLAssembler::extract(integer_t& d, int s, int h, int l, int bits)
assert(maskLen<=8);
#endif
assert(h);
-
+
if (h != bits) {
const int mask = ((1<<maskLen)-1) << l;
if (isValidImmediate(mask)) {
@@ -126,12 +128,12 @@ void GGLAssembler::extract(integer_t& d, int s, int h, int l, int bits)
}
s = d.reg;
}
-
+
if (l) {
MOV(AL, 0, d.reg, reg_imm(s, LSR, l)); // component = packed >> l;
s = d.reg;
}
-
+
if (s != d.reg) {
MOV(AL, 0, d.reg, s);
}
@@ -212,12 +214,12 @@ void GGLAssembler::expand(integer_t& dst, const integer_t& src, int dbits)
} while(dbits>0);
return;
}
-
+
dbits -= sbits;
do {
ORR(AL, 0, d, s, reg_imm(s, LSL, sbits));
// d |= d<<sbits;
- s = d;
+ s = d;
dbits -= sbits;
if (sbits*2 < dbits) {
sbits *= 2;
@@ -241,14 +243,14 @@ void GGLAssembler::downshift(
int dl = d.format.c[component].l;
int dbits = dh - dl;
int dithering = 0;
-
+
ALOGE_IF(sbits<dbits, "sbits (%d) < dbits (%d) in downshift", sbits, dbits);
if (sbits>dbits) {
// see if we need to dither
dithering = mDithering;
}
-
+
int ireg = d.reg;
if (!(d.flags & FIRST)) {
if (s.flags & CORRUPTIBLE) {
@@ -271,7 +273,7 @@ void GGLAssembler::downshift(
if (isValidImmediate(mask) || isValidImmediate(~mask)) {
build_and_immediate(ireg, s.reg, mask, 32);
sl = offset;
- s.reg = ireg;
+ s.reg = ireg;
sbits = dbits;
maskLoBits = maskHiBits = 0;
}
@@ -281,7 +283,7 @@ void GGLAssembler::downshift(
const uint32_t mask = ((1<<sbits)-1) << sl;
if (isValidImmediate(mask) || isValidImmediate(~mask)) {
build_and_immediate(ireg, s.reg, mask, 32);
- s.reg = ireg;
+ s.reg = ireg;
maskLoBits = maskHiBits = 0;
}
}
@@ -325,7 +327,7 @@ void GGLAssembler::downshift(
MOV(AL, 0, ireg, reg_imm(s.reg, LSR, sl));
sh -= sl;
sl = 0;
- s.reg = ireg;
+ s.reg = ireg;
}
// scaling (V-V>>dbits)
SUB(AL, 0, ireg, s.reg, reg_imm(s.reg, LSR, dbits));
@@ -333,7 +335,7 @@ void GGLAssembler::downshift(
if (shift>0) ADD(AL, 0, ireg, ireg, reg_imm(dither.reg, LSR, shift));
else if (shift<0) ADD(AL, 0, ireg, ireg, reg_imm(dither.reg, LSL,-shift));
else ADD(AL, 0, ireg, ireg, dither.reg);
- s.reg = ireg;
+ s.reg = ireg;
}
if ((maskLoBits|dithering) && (sh > dbits)) {
diff --git a/libpixelflinger/codeflinger/mips64_disassem.c b/libpixelflinger/codeflinger/mips64_disassem.c
index 44b7fe7cd..f28d72627 100644
--- a/libpixelflinger/codeflinger/mips64_disassem.c
+++ b/libpixelflinger/codeflinger/mips64_disassem.c
@@ -34,21 +34,20 @@
* from: @(#)kadb.c 8.1 (Berkeley) 6/10/93
*/
-#include <stdio.h>
-#include <stdint.h>
#include <stdarg.h>
#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
#include <sys/cdefs.h>
-
#include <sys/types.h>
-#include "mips_opcode.h"
-#include <cutils/log.h>
+#include <android/log.h>
+
+#include "mips_opcode.h"
static char *sprintf_buffer;
static int sprintf_buf_len;
-
typedef uint64_t db_addr_t;
static void db_printf(const char* fmt, ...);
diff --git a/libpixelflinger/codeflinger/texturing.cpp b/libpixelflinger/codeflinger/texturing.cpp
index 29a3742c1..d66981dad 100644
--- a/libpixelflinger/codeflinger/texturing.cpp
+++ b/libpixelflinger/codeflinger/texturing.cpp
@@ -2,26 +2,26 @@
**
** Copyright 2006, 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 <assert.h>
#include <stdint.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include "GGLAssembler.h"
diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp
index aa1836053..1a2f6fb91 100644
--- a/libpixelflinger/scanline.cpp
+++ b/libpixelflinger/scanline.cpp
@@ -2,29 +2,28 @@
**
** Copyright 2006-2011, 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.
*/
-
#define LOG_TAG "pixelflinger"
#include <assert.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#include <android/log.h>
#include <cutils/memory.h>
-#include <cutils/log.h>
#include "buffer.h"
#include "scanline.h"
diff --git a/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp b/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp
index e8c4626b2..9fb0a2802 100644
--- a/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp
+++ b/libpixelflinger/tests/arch-mips64/assembler/mips64_assembler_test.cpp
@@ -26,21 +26,21 @@
* SUCH DAMAGE.
*/
+#include <errno.h>
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/mman.h>
#include <unistd.h>
-#include <errno.h>
-#include <sys/mman.h>
+#include <android/log.h>
#include <cutils/ashmem.h>
-#include <cutils/log.h>
-
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
#include "codeflinger/ARMAssemblerInterface.h"
#include "codeflinger/MIPS64Assembler.h"
+
using namespace android;
#define TESTS_DATAOP_ENABLE 1
diff --git a/libpixelflinger/trap.cpp b/libpixelflinger/trap.cpp
index ea5362553..f00e50aee 100644
--- a/libpixelflinger/trap.cpp
+++ b/libpixelflinger/trap.cpp
@@ -2,16 +2,16 @@
**
** Copyright 2006, 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.
*/
@@ -19,12 +19,12 @@
#include <stdio.h>
#include <stdlib.h>
+#include <android/log.h>
+#include <cutils/memory.h>
+
#include "trap.h"
#include "picker.h"
-#include <cutils/log.h>
-#include <cutils/memory.h>
-
namespace android {
// ----------------------------------------------------------------------------
diff --git a/libsuspend/autosuspend.c b/libsuspend/autosuspend.c
index edd100711..64d1bfc74 100644
--- a/libsuspend/autosuspend.c
+++ b/libsuspend/autosuspend.c
@@ -14,10 +14,11 @@
* limitations under the License.
*/
+#define LOG_TAG "libsuspend"
+
#include <stdbool.h>
-#define LOG_TAG "libsuspend"
-#include <cutils/log.h>
+#include <android/log.h>
#include <suspend/autosuspend.h>
diff --git a/libsuspend/autosuspend_autosleep.c b/libsuspend/autosuspend_autosleep.c
index 7262cc7e8..97109ac2c 100644
--- a/libsuspend/autosuspend_autosleep.c
+++ b/libsuspend/autosuspend_autosleep.c
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define LOG_TAG "libsuspend"
+
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
@@ -22,8 +24,7 @@
#include <sys/types.h>
#include <unistd.h>
-#define LOG_TAG "libsuspend"
-#include <cutils/log.h>
+#include <android/log.h>
#include "autosuspend_ops.h"
diff --git a/libsuspend/autosuspend_earlysuspend.c b/libsuspend/autosuspend_earlysuspend.c
index 3793a699e..9519e51ea 100644
--- a/libsuspend/autosuspend_earlysuspend.c
+++ b/libsuspend/autosuspend_earlysuspend.c
@@ -14,18 +14,19 @@
* limitations under the License.
*/
+#define LOG_TAG "libsuspend"
+
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
-#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <unistd.h>
-#define LOG_TAG "libsuspend"
-#include <cutils/log.h>
+#include <android/log.h>
#include "autosuspend_ops.h"
diff --git a/libsuspend/autosuspend_wakeup_count.c b/libsuspend/autosuspend_wakeup_count.c
index 23a029027..d3fb45fcf 100644
--- a/libsuspend/autosuspend_wakeup_count.c
+++ b/libsuspend/autosuspend_wakeup_count.c
@@ -14,6 +14,9 @@
* limitations under the License.
*/
+#define LOG_TAG "libsuspend"
+//#define LOG_NDEBUG 0
+
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
@@ -25,9 +28,7 @@
#include <sys/types.h>
#include <unistd.h>
-#define LOG_TAG "libsuspend"
-//#define LOG_NDEBUG 0
-#include <cutils/log.h>
+#include <android/log.h>
#include "autosuspend_ops.h"
diff --git a/libsysutils/src/FrameworkClient.cpp b/libsysutils/src/FrameworkClient.cpp
index 2f3705535..72b3d0a36 100644
--- a/libsysutils/src/FrameworkClient.cpp
+++ b/libsysutils/src/FrameworkClient.cpp
@@ -1,11 +1,27 @@
+/*
+ * Copyright (C) 2009-2016 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
+ *
+ * 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
+ * limitations under the License.
+ */
+
+#define LOG_TAG "FrameworkClient"
+
#include <alloca.h>
#include <errno.h>
-#include <sys/types.h>
#include <pthread.h>
+#include <sys/types.h>
-#define LOG_TAG "FrameworkClient"
-#include <cutils/log.h>
-
+#include <android/log.h>
#include <sysutils/FrameworkClient.h>
FrameworkClient::FrameworkClient(int socket) {
diff --git a/libsysutils/src/FrameworkCommand.cpp b/libsysutils/src/FrameworkCommand.cpp
index 0b95a8104..dccacda4e 100644
--- a/libsysutils/src/FrameworkCommand.cpp
+++ b/libsysutils/src/FrameworkCommand.cpp
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <errno.h>
#define LOG_TAG "FrameworkCommand"
-#include <cutils/log.h>
+#include <errno.h>
+#include <android/log.h>
#include <sysutils/FrameworkCommand.h>
#define UNUSED __attribute__((unused))
diff --git a/libsysutils/src/FrameworkListener.cpp b/libsysutils/src/FrameworkListener.cpp
index 579ead991..b1fb849ff 100644
--- a/libsysutils/src/FrameworkListener.cpp
+++ b/libsysutils/src/FrameworkListener.cpp
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
#define LOG_TAG "FrameworkListener"
-#include <cutils/log.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
-#include <sysutils/FrameworkListener.h>
+#include <android/log.h>
#include <sysutils/FrameworkCommand.h>
+#include <sysutils/FrameworkListener.h>
#include <sysutils/SocketClient.h>
static const int CMD_BUF_SIZE = 1024;
diff --git a/libsysutils/src/NetlinkEvent.cpp b/libsysutils/src/NetlinkEvent.cpp
index 739fad7d0..b78769254 100644
--- a/libsysutils/src/NetlinkEvent.cpp
+++ b/libsysutils/src/NetlinkEvent.cpp
@@ -13,39 +13,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <stdlib.h>
-#include <string.h>
#define LOG_TAG "NetlinkEvent"
-#include <cutils/log.h>
-
-#include <sysutils/NetlinkEvent.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
#include <arpa/inet.h>
-#include <net/if.h>
-
#include <linux/if.h>
#include <linux/if_addr.h>
#include <linux/if_link.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nfnetlink_log.h>
#include <linux/netfilter_ipv4/ipt_ULOG.h>
-
-/* From kernel's net/netfilter/xt_quota2.c */
-const int LOCAL_QLOG_NL_EVENT = 112;
-const int LOCAL_NFLOG_PACKET = NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET;
-
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netinet/icmp6.h>
#include <netlink/attr.h>
#include <netlink/genl/genl.h>
#include <netlink/handlers.h>
#include <netlink/msg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+
+/* From kernel's net/netfilter/xt_quota2.c */
+const int LOCAL_QLOG_NL_EVENT = 112;
+const int LOCAL_NFLOG_PACKET = NFNL_SUBSYS_ULOG << 8 | NFULNL_MSG_PACKET;
+
+#include <android/log.h>
+#include <sysutils/NetlinkEvent.h>
NetlinkEvent::NetlinkEvent() {
mAction = Action::kUnknown;
diff --git a/libsysutils/src/NetlinkListener.cpp b/libsysutils/src/NetlinkListener.cpp
index 637aa1ea3..1c4c7df6d 100644
--- a/libsysutils/src/NetlinkListener.cpp
+++ b/libsysutils/src/NetlinkListener.cpp
@@ -13,17 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <linux/netlink.h>
+#define LOG_TAG "NetlinkListener"
+
+#include <errno.h>
#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
-#define LOG_TAG "NetlinkListener"
-#include <cutils/log.h>
-#include <cutils/uevent.h>
+#include <linux/netlink.h> /* out of order because must follow sys/socket.h */
+#include <android/log.h>
+#include <cutils/uevent.h>
#include <sysutils/NetlinkEvent.h>
#if 1
diff --git a/libsysutils/src/ServiceManager.cpp b/libsysutils/src/ServiceManager.cpp
index 41ac1dd31..1abe988a8 100644
--- a/libsysutils/src/ServiceManager.cpp
+++ b/libsysutils/src/ServiceManager.cpp
@@ -1,11 +1,27 @@
+/*
+ * Copyright (C) 2009-2016 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
+ *
+ * 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
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Service"
+
#include <errno.h>
#include <string.h>
-#include <sysutils/ServiceManager.h>
-
-#define LOG_TAG "Service"
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/properties.h>
+#include <sysutils/ServiceManager.h>
ServiceManager::ServiceManager() {
}
diff --git a/libsysutils/src/SocketClient.cpp b/libsysutils/src/SocketClient.cpp
index bb9b6a164..02505d304 100644
--- a/libsysutils/src/SocketClient.cpp
+++ b/libsysutils/src/SocketClient.cpp
@@ -1,16 +1,32 @@
+/*
+ * Copyright (C) 2009-2016 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
+ *
+ * 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
+ * limitations under the License.
+ */
+
+#define LOG_TAG "SocketClient"
+
#include <alloca.h>
+#include <arpa/inet.h>
#include <errno.h>
#include <malloc.h>
#include <pthread.h>
#include <signal.h>
#include <string.h>
-#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/types.h>
-#define LOG_TAG "SocketClient"
-#include <cutils/log.h>
-
+#include <android/log.h>
#include <sysutils/SocketClient.h>
SocketClient::SocketClient(int socket, bool owned) {
diff --git a/libsysutils/src/SocketListener.cpp b/libsysutils/src/SocketListener.cpp
index 608abaea5..6a676a954 100644
--- a/libsysutils/src/SocketListener.cpp
+++ b/libsysutils/src/SocketListener.cpp
@@ -13,19 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <stdio.h>
+
+#define LOG_TAG "SocketListener"
+
#include <errno.h>
+#include <stdio.h>
#include <stdlib.h>
-#include <sys/socket.h>
#include <sys/select.h>
+#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
-#define LOG_TAG "SocketListener"
-#include <cutils/log.h>
+#include <android/log.h>
#include <cutils/sockets.h>
-
#include <sysutils/SocketListener.h>
#include <sysutils/SocketClient.h>
diff --git a/libutils/Looper.cpp b/libutils/Looper.cpp
index adb0f8d47..26e27cf79 100644
--- a/libutils/Looper.cpp
+++ b/libutils/Looper.cpp
@@ -13,18 +13,17 @@
// Debugs callback registration and invocation.
#define DEBUG_CALLBACKS 0
-#include <cutils/log.h>
-#include <utils/Looper.h>
-#include <utils/Timers.h>
-
#include <errno.h>
#include <fcntl.h>
-#include <limits.h>
#include <inttypes.h>
+#include <limits.h>
#include <string.h>
#include <sys/eventfd.h>
#include <unistd.h>
+#include <android/log.h>
+#include <utils/Looper.h>
+#include <utils/Timers.h>
namespace android {
diff --git a/libutils/VectorImpl.cpp b/libutils/VectorImpl.cpp
index e8d40ed20..893e4f26f 100644
--- a/libutils/VectorImpl.cpp
+++ b/libutils/VectorImpl.cpp
@@ -16,16 +16,16 @@
#define LOG_TAG "Vector"
-#include <string.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
-#include <cutils/log.h>
-#include <safe_iop.h>
-
+#include <android/log.h>
#include <utils/Errors.h>
#include <utils/VectorImpl.h>
+#include <safe_iop.h>
+
#include "SharedBuffer.h"
/*****************************************************************************/
diff --git a/libutils/tests/BitSet_test.cpp b/libutils/tests/BitSet_test.cpp
index 59d913e6b..fbcf02595 100644
--- a/libutils/tests/BitSet_test.cpp
+++ b/libutils/tests/BitSet_test.cpp
@@ -16,11 +16,12 @@
#define LOG_TAG "BitSet_test"
-#include <utils/BitSet.h>
-#include <cutils/log.h>
-#include <gtest/gtest.h>
#include <unistd.h>
+#include <android/log.h>
+#include <gtest/gtest.h>
+#include <utils/BitSet.h>
+
namespace android {
class BitSet32Test : public testing::Test {
diff --git a/libutils/tests/LruCache_test.cpp b/libutils/tests/LruCache_test.cpp
index de440fd7e..4e885bba4 100644
--- a/libutils/tests/LruCache_test.cpp
+++ b/libutils/tests/LruCache_test.cpp
@@ -15,10 +15,11 @@
*/
#include <stdlib.h>
+
+#include <android/log.h>
+#include <gtest/gtest.h>
#include <utils/JenkinsHash.h>
#include <utils/LruCache.h>
-#include <cutils/log.h>
-#include <gtest/gtest.h>
namespace {
diff --git a/libutils/tests/Vector_test.cpp b/libutils/tests/Vector_test.cpp
index 24ecf86a0..671200f4f 100644
--- a/libutils/tests/Vector_test.cpp
+++ b/libutils/tests/Vector_test.cpp
@@ -18,11 +18,12 @@
#define __STDC_LIMIT_MACROS
#include <stdint.h>
-#include <utils/Vector.h>
-#include <cutils/log.h>
-#include <gtest/gtest.h>
#include <unistd.h>
+#include <android/log.h>
+#include <gtest/gtest.h>
+#include <utils/Vector.h>
+
namespace android {
class VectorTest : public testing::Test {
diff --git a/logwrapper/logwrap.c b/logwrapper/logwrap.c
index ccbe0bf28..1bfecd69a 100644
--- a/logwrapper/logwrap.c
+++ b/logwrapper/logwrap.c
@@ -14,24 +14,24 @@
* limitations under the License.
*/
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <poll.h>
-#include <sys/wait.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
-#include <stdbool.h>
+#include <poll.h>
#include <pthread.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
-#include <logwrap/logwrap.h>
-#include "private/android_filesystem_config.h"
-#include "cutils/log.h"
+#include <android/log.h>
#include <cutils/klog.h>
+#include <logwrap/logwrap.h>
+#include <private/android_filesystem_config.h>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
#define MIN(a,b) (((a)<(b))?(a):(b))
diff --git a/logwrapper/logwrapper.c b/logwrapper/logwrapper.c
index 55b71c708..28fe530e1 100644
--- a/logwrapper/logwrapper.c
+++ b/logwrapper/logwrapper.c
@@ -20,10 +20,9 @@
#include <sys/wait.h>
#include <unistd.h>
-#include <logwrap/logwrap.h>
+#include <android/log.h>
#include <cutils/klog.h>
-
-#include "cutils/log.h"
+#include <logwrap/logwrap.h>
void fatal(const char *msg) {
fprintf(stderr, "%s", msg);
diff --git a/trusty/gatekeeper/trusty_gatekeeper.cpp b/trusty/gatekeeper/trusty_gatekeeper.cpp
index d24f44f2e..7e55fb1eb 100644
--- a/trusty/gatekeeper/trusty_gatekeeper.cpp
+++ b/trusty/gatekeeper/trusty_gatekeeper.cpp
@@ -14,18 +14,19 @@
* limitations under the License.
*/
+#define LOG_TAG "TrustyGateKeeper"
+
+#include <assert.h>
#include <errno.h>
#include <stdio.h>
-#include <assert.h>
#include <type_traits>
+#include <android/log.h>
+
#include "trusty_gatekeeper.h"
#include "trusty_gatekeeper_ipc.h"
#include "gatekeeper_ipc.h"
-#define LOG_TAG "TrustyGateKeeper"
-#include <cutils/log.h>
-
namespace gatekeeper {
const uint32_t SEND_BUF_SIZE = 8192;
diff --git a/trusty/gatekeeper/trusty_gatekeeper_ipc.c b/trusty/gatekeeper/trusty_gatekeeper_ipc.c
index a1c319e5a..ae536c539 100644
--- a/trusty/gatekeeper/trusty_gatekeeper_ipc.c
+++ b/trusty/gatekeeper/trusty_gatekeeper_ipc.c
@@ -14,12 +14,13 @@
* limitations under the License.
*/
+#define LOG_TAG "TrustyGateKeeper"
+
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#define LOG_TAG "TrustyGateKeeper"
-#include <cutils/log.h>
+#include <android/log.h>
#include <trusty/tipc.h>
#include "trusty_gatekeeper_ipc.h"
diff --git a/trusty/keymaster/trusty_keymaster_device.cpp b/trusty/keymaster/trusty_keymaster_device.cpp
index 069b4fedb..de5e46335 100644
--- a/trusty/keymaster/trusty_keymaster_device.cpp
+++ b/trusty/keymaster/trusty_keymaster_device.cpp
@@ -14,26 +14,24 @@
* limitations under the License.
*/
-#include "trusty_keymaster_device.h"
+#define LOG_TAG "TrustyKeymaster"
#include <assert.h>
+#include <openssl/evp.h>
+#include <openssl/x509.h>
+#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <stddef.h>
#include <type_traits>
-#include <openssl/evp.h>
-#include <openssl/x509.h>
-
-#define LOG_TAG "TrustyKeymaster"
-#include <cutils/log.h>
+#include <android/log.h>
#include <hardware/keymaster0.h>
-
#include <keymaster/authorization_set.h>
+#include "trusty_keymaster_device.h"
#include "trusty_keymaster_ipc.h"
#include "keymaster_ipc.h"
diff --git a/trusty/keymaster/trusty_keymaster_ipc.c b/trusty/keymaster/trusty_keymaster_ipc.c
index b68209ef3..0159bcead 100644
--- a/trusty/keymaster/trusty_keymaster_ipc.c
+++ b/trusty/keymaster/trusty_keymaster_ipc.c
@@ -14,15 +14,15 @@
* limitations under the License.
*/
+#define LOG_TAG "TrustyKeymaster"
+
// TODO: make this generic in libtrusty
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#define LOG_TAG "TrustyKeymaster"
-#include <cutils/log.h>
-
+#include <android/log.h>
#include <trusty/tipc.h>
#include "trusty_keymaster_ipc.h"
diff --git a/trusty/libtrusty/trusty.c b/trusty/libtrusty/trusty.c
index b6897ce17..ba16bee4a 100644
--- a/trusty/libtrusty/trusty.c
+++ b/trusty/libtrusty/trusty.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
-#include <cutils/log.h>
+#include <android/log.h>
#include "tipc_ioctl.h"
diff --git a/trusty/storage/lib/storage.c b/trusty/storage/lib/storage.c
index 8130f769a..3002c0bde 100644
--- a/trusty/storage/lib/storage.c
+++ b/trusty/storage/lib/storage.c
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define LOG_TAG "trusty_storage_client"
+
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
@@ -21,12 +23,10 @@
#include <string.h>
#include <sys/uio.h>
+#include <android/log.h>
#include <trusty/tipc.h>
#include <trusty/lib/storage.h>
-#define LOG_TAG "trusty_storage_client"
-#include <cutils/log.h>
-
#define MAX_CHUNK_SIZE 4040
static inline file_handle_t make_file_handle(storage_session_t s, uint32_t fid)
diff --git a/trusty/storage/proxy/log.h b/trusty/storage/proxy/log.h
index 471cb500f..3d2e65460 100644
--- a/trusty/storage/proxy/log.h
+++ b/trusty/storage/proxy/log.h
@@ -15,5 +15,6 @@
*/
#define LOG_TAG "storageproxyd"
-#include <cutils/log.h>
+
+#include <android/log.h>