system/core Replace cutils/log.h with android/log.h

Should use android/log.h instead of cutils/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
diff --git a/trusty/gatekeeper/trusty_gatekeeper.cpp b/trusty/gatekeeper/trusty_gatekeeper.cpp
index d24f44f..7e55fb1 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 a1c319e..ae536c5 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 069b4fe..de5e463 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 b68209e..0159bce 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 b6897ce..ba16bee 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 8130f76..3002c0b 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 471cb50..3d2e654 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>