Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)  DO NOT MERGE

Bug: 5449033
Change-Id: I4951baa981f09a84ce483e3d1bd0f9ebe009035f
diff --git a/include/cutils/log.h b/include/cutils/log.h
index 0a011fe..9a2ad63 100644
--- a/include/cutils/log.h
+++ b/include/cutils/log.h
@@ -111,12 +111,12 @@
 /*
  * Simplified macro to send an info log message using the current LOG_TAG.
  */
-#ifndef LOGI
-#define LOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
+#ifndef ALOGI
+#define ALOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
 #endif
 
-#ifndef LOGI_IF
-#define LOGI_IF(cond, ...) \
+#ifndef ALOGI_IF
+#define ALOGI_IF(cond, ...) \
     ( (CONDITION(cond)) \
     ? ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) \
     : (void)0 )
@@ -176,8 +176,8 @@
  * Conditional based on whether the current LOG_TAG is enabled at
  * info priority.
  */
-#ifndef IF_LOGI
-#define IF_LOGI() IF_ALOG(LOG_INFO, LOG_TAG)
+#ifndef IF_ALOGI
+#define IF_ALOGI() IF_ALOG(LOG_INFO, LOG_TAG)
 #endif
 
 /*
diff --git a/libcutils/loghack.h b/libcutils/loghack.h
index e35f887..8b357ca 100644
--- a/libcutils/loghack.h
+++ b/libcutils/loghack.h
@@ -29,7 +29,7 @@
         ((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__))
 #define ALOGV(...)   ALOG("V", __VA_ARGS__)
 #define ALOGD(...)   ALOG("D", __VA_ARGS__)
-#define LOGI(...)   ALOG("I", __VA_ARGS__)
+#define ALOGI(...)   ALOG("I", __VA_ARGS__)
 #define LOGW(...)   ALOG("W", __VA_ARGS__)
 #define LOGE(...)   ALOG("E", __VA_ARGS__)
 #define LOG_ALWAYS_FATAL(...)   do { LOGE(__VA_ARGS__); exit(1); } while (0)
diff --git a/libcutils/mq.c b/libcutils/mq.c
index 65af198..132debd 100644
--- a/libcutils/mq.c
+++ b/libcutils/mq.c
@@ -374,10 +374,10 @@
  */
 static void peerProxyKill(PeerProxy* peerProxy, bool errnoIsSet) {
     if (errnoIsSet) {
-        LOGI("Peer %d died. errno: %s", peerProxy->credentials.pid, 
+        ALOGI("Peer %d died. errno: %s", peerProxy->credentials.pid, 
                 strerror(errno));
     } else {
-        LOGI("Peer %d died.", peerProxy->credentials.pid);
+        ALOGI("Peer %d died.", peerProxy->credentials.pid);
     }
     
     // If we lost the master, we're up a creek. We can't let this happen.
@@ -902,7 +902,7 @@
     peerUnlock(peer);
 
     if (peerProxy != NULL) {
-        LOGI("Couldn't connect to %d.", pid);
+        ALOGI("Couldn't connect to %d.", pid);
         peerProxyKill(peerProxy, false);
     } else {
         LOGW("Peer proxy for %d not found. This shouldn't happen.", pid);
@@ -947,7 +947,7 @@
         return false;
     } else if (size == 0) {
         // EOF.
-    	LOGI("EOF");
+    	ALOGI("EOF");
         peerProxyKill(peerProxy, false);
         return false;
     } else if (bufferReadComplete(in)) {
@@ -1050,7 +1050,7 @@
     credentials.uid = ucredentials.uid;
     credentials.gid = ucredentials.gid;
     
-    LOGI("Accepted connection from process %d.", credentials.pid);
+    ALOGI("Accepted connection from process %d.", credentials.pid);
    
     Peer* masterPeer = (Peer*) listenerFd->data;
     
diff --git a/libcutils/qtaguid.c b/libcutils/qtaguid.c
index fee67fd..1c57774 100644
--- a/libcutils/qtaguid.c
+++ b/libcutils/qtaguid.c
@@ -74,7 +74,7 @@
         savedErrno = 0;
     }
     if (res < 0) {
-        LOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno);
+        ALOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno);
     }
     close(fd);
     return -savedErrno;
@@ -111,7 +111,7 @@
 
     res = write_ctrl(lineBuf);
     if (res < 0) {
-        LOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d",
+        ALOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d",
              sockfd, kTag, tag, uid, res);
     }
 
@@ -127,7 +127,7 @@
     snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd);
     res = write_ctrl(lineBuf);
     if (res < 0) {
-        LOGI("Untagging socket %d failed errno=%d", sockfd, res);
+        ALOGI("Untagging socket %d failed errno=%d", sockfd, res);
     }
 
     return res;
@@ -156,7 +156,7 @@
     snprintf(lineBuf, sizeof(lineBuf), "d %llu %d", kTag, uid);
     res = write_ctrl(lineBuf);
     if (res < 0) {
-        LOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d",
+        ALOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d",
              kTag, tag, uid, cnt, errno);
     }
 
diff --git a/libcutils/selector.c b/libcutils/selector.c
index 9aef5fa..3776bbb 100644
--- a/libcutils/selector.c
+++ b/libcutils/selector.c
@@ -48,7 +48,7 @@
     static char garbage[64];
     if (read(wakeupFd->fd, garbage, sizeof(garbage)) < 0) {
         if (errno == EINTR) {
-            LOGI("read() interrupted.");    
+            ALOGI("read() interrupted.");    
         } else {
             LOG_ALWAYS_FATAL("This should never happen: %s", strerror(errno));
         }
@@ -77,7 +77,7 @@
     static char garbage[1];
     if (write(selector->wakeupPipe[1], garbage, sizeof(garbage)) < 0) {
         if (errno == EINTR) {
-            LOGI("read() interrupted.");    
+            ALOGI("read() interrupted.");    
         } else {
             LOG_ALWAYS_FATAL("This should never happen: %s", strerror(errno));
         }
@@ -251,7 +251,7 @@
         if (result == -1) {
             // Abort on everything except EINTR.
             if (errno == EINTR) {
-                LOGI("select() interrupted.");    
+                ALOGI("select() interrupted.");    
             } else {
                 LOG_ALWAYS_FATAL("select() error: %s", 
                         strerror(errno));
diff --git a/libcutils/str_parms.c b/libcutils/str_parms.c
index 7ea65ce..14fecec 100644
--- a/libcutils/str_parms.c
+++ b/libcutils/str_parms.c
@@ -281,7 +281,7 @@
 
 static bool dump_entry(void *key, void *value, void *context)
 {
-    LOGI("key: '%s' value: '%s'\n", (char *)key, (char *)value);
+    ALOGI("key: '%s' value: '%s'\n", (char *)key, (char *)value);
     return true;
 }
 
@@ -301,7 +301,7 @@
     str_parms_dump(str_parms);
     out_str = str_parms_to_str(str_parms);
     str_parms_destroy(str_parms);
-    LOGI("%s: '%s' stringified is '%s'", __func__, str, out_str);
+    ALOGI("%s: '%s' stringified is '%s'", __func__, str, out_str);
     free(out_str);
 }
 
diff --git a/libdiskconfig/config_mbr.c b/libdiskconfig/config_mbr.c
index 825ba60..07bd6a7 100644
--- a/libdiskconfig/config_mbr.c
+++ b/libdiskconfig/config_mbr.c
@@ -47,7 +47,7 @@
     pentry->start_lba = start;
     pentry->len_lba = len;
 
-    LOGI("Configuring pentry. status=0x%x type=0x%x start_lba=%u len_lba=%u",
+    ALOGI("Configuring pentry. status=0x%x type=0x%x start_lba=%u len_lba=%u",
          pentry->status, pentry->type, pentry->start_lba, pentry->len_lba);
 }
 
diff --git a/libdiskconfig/diskconfig.c b/libdiskconfig/diskconfig.c
index aac3e69..66bd0c3 100644
--- a/libdiskconfig/diskconfig.c
+++ b/libdiskconfig/diskconfig.c
@@ -319,7 +319,7 @@
         } else
             disk_size = (uint64_t)dinfo->num_lba * (uint64_t)dinfo->sect_size;
     } else if (S_ISREG(stat.st_mode)) {
-        LOGI("Requesting operation on a regular file, not block device.");
+        ALOGI("Requesting operation on a regular file, not block device.");
         if (!dinfo->sect_size) {
             LOGE("Sector size for regular file images cannot be zero");
             goto fail;
diff --git a/libdiskconfig/diskutils.c b/libdiskconfig/diskutils.c
index 22767c0..be35763 100644
--- a/libdiskconfig/diskutils.c
+++ b/libdiskconfig/diskutils.c
@@ -40,7 +40,7 @@
     int done = 0;
     uint64_t total = 0;
 
-    LOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, offset);
+    ALOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, offset);
     if ((src_fd = open(src, O_RDONLY)) < 0) {
         LOGE("Could not open %s for reading (errno=%d).", src, errno);
         goto fail;
@@ -101,7 +101,7 @@
     if (dst_fd >= 0)
         fsync(dst_fd);
 
-    LOGI("Wrote %llu bytes to %s @ %lld", total, dst, offset);
+    ALOGI("Wrote %llu bytes to %s @ %lld", total, dst, offset);
 
     close(src_fd);
     if (dst_fd >= 0)
diff --git a/libdiskconfig/write_lst.c b/libdiskconfig/write_lst.c
index 12b7cd7..d99a807 100644
--- a/libdiskconfig/write_lst.c
+++ b/libdiskconfig/write_lst.c
@@ -82,7 +82,7 @@
                 goto fail;
             }
         } else
-            LOGI("Would write %d bytes @ offset %lld.", lst->len, lst->offset);
+            ALOGI("Would write %d bytes @ offset %lld.", lst->len, lst->offset);
     }
 
     return 0;
diff --git a/libpixelflinger/codeflinger/ARMAssembler.cpp b/libpixelflinger/codeflinger/ARMAssembler.cpp
index 4726a08..0dc5037 100644
--- a/libpixelflinger/codeflinger/ARMAssembler.cpp
+++ b/libpixelflinger/codeflinger/ARMAssembler.cpp
@@ -177,7 +177,7 @@
     // the instruction cache is flushed by CodeCache
     const int64_t duration = ggl_system_time() - mDuration;
     const char * const format = "generated %s (%d ins) at [%p:%p] in %lld ns\n";
-    LOGI(format, name, int(pc()-base()), base(), pc(), duration);
+    ALOGI(format, name, int(pc()-base()), base(), pc(), duration);
 
 #if defined(WITH_LIB_HARDWARE)
     if (__builtin_expect(mQemuTracing, 0)) {
diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp
index a37b47e..043a37c 100644
--- a/libpixelflinger/scanline.cpp
+++ b/libpixelflinger/scanline.cpp
@@ -351,7 +351,7 @@
     }
 
 #if DEBUG_NEEDS
-    LOGI("Needs: n=0x%08x p=0x%08x t0=0x%08x t1=0x%08x",
+    ALOGI("Needs: n=0x%08x p=0x%08x t0=0x%08x t1=0x%08x",
          c->state.needs.n, c->state.needs.p,
          c->state.needs.t[0], c->state.needs.t[1]);
 #endif
@@ -395,7 +395,7 @@
         c->scanline_as->decStrong(c);
     }
 
-    //LOGI("using generated pixel-pipeline");
+    //ALOGI("using generated pixel-pipeline");
     c->scanline_as = assembly.get();
     c->scanline_as->incStrong(c); //  hold on to assembly
     c->scanline = (void(*)(context_t* c))assembly->base();
diff --git a/libpixelflinger/trap.cpp b/libpixelflinger/trap.cpp
index 853117c..80efeff 100644
--- a/libpixelflinger/trap.cpp
+++ b/libpixelflinger/trap.cpp
@@ -639,7 +639,7 @@
 static void
 edge_dump( Edge*  edge )
 {
-  LOGI( "  top=%d (%.3f)  bot=%d (%.3f)  x=%d (%.3f)  ix=%d (%.3f)",
+  ALOGI( "  top=%d (%.3f)  bot=%d (%.3f)  x=%d (%.3f)  ix=%d (%.3f)",
         edge->y_top, edge->y_top/float(TRI_ONE),
 		edge->y_bot, edge->y_bot/float(TRI_ONE),
 		edge->x, edge->x/float(FIXED_ONE),
@@ -650,7 +650,7 @@
 triangle_dump_edges( Edge*  edges,
                      int            count )
 { 
-    LOGI( "%d edge%s:\n", count, count == 1 ? "" : "s" );
+    ALOGI( "%d edge%s:\n", count, count == 1 ? "" : "s" );
 	for ( ; count > 0; count--, edges++ )
 	  edge_dump( edges );
 }
diff --git a/nexus/WifiController.cpp b/nexus/WifiController.cpp
index 1209d1f..18891ce 100644
--- a/nexus/WifiController.cpp
+++ b/nexus/WifiController.cpp
@@ -108,7 +108,7 @@
 int WifiController::enable() {
 
     if (!isPoweredUp()) {
-        LOGI("Powering up");
+        ALOGI("Powering up");
         sendStatusBroadcast("Powering up WiFi hardware");
         if (powerUp()) {
             LOGE("Powerup failed (%s)", strerror(errno));
@@ -117,7 +117,7 @@
     }
 
     if (mModuleName[0] != '\0' && !isKernelModuleLoaded(mModuleName)) {
-        LOGI("Loading driver");
+        ALOGI("Loading driver");
         sendStatusBroadcast("Loading WiFi driver");
         if (loadKernelModule(mModulePath, mModuleArgs)) {
             LOGE("Kernel module load failed (%s)", strerror(errno));
@@ -126,7 +126,7 @@
     }
 
     if (!isFirmwareLoaded()) {
-        LOGI("Loading firmware");
+        ALOGI("Loading firmware");
         sendStatusBroadcast("Loading WiFI firmware");
         if (loadFirmware()) {
             LOGE("Firmware load failed (%s)", strerror(errno));
@@ -135,7 +135,7 @@
     }
 
     if (!mSupplicant->isStarted()) {
-        LOGI("Starting WPA Supplicant");
+        ALOGI("Starting WPA Supplicant");
         sendStatusBroadcast("Starting WPA Supplicant");
         if (mSupplicant->start()) {
             LOGE("Supplicant start failed (%s)", strerror(errno));
@@ -167,7 +167,7 @@
     mPropMngr->attachProperty("wifi", mDynamicProperties.propNetCount);
     mPropMngr->attachProperty("wifi", mDynamicProperties.propTriggerScan);
 
-    LOGI("Enabled successfully");
+    ALOGI("Enabled successfully");
     return 0;
 
 out_unloadmodule:
diff --git a/nexus/main.cpp b/nexus/main.cpp
index 936d33f..5d21067 100644
--- a/nexus/main.cpp
+++ b/nexus/main.cpp
@@ -28,7 +28,7 @@
 #include "TiwlanWifiController.h"
 
 int main() {
-    LOGI("Nexus version 0.1 firing up");
+    ALOGI("Nexus version 0.1 firing up");
 
     CommandListener *cl = new CommandListener();
 
@@ -62,6 +62,6 @@
         sleep(1000);
     }
 
-    LOGI("Nexus exiting");
+    ALOGI("Nexus exiting");
     exit(0);
 }