Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
diff --git a/libs/utils/Asset.cpp b/libs/utils/Asset.cpp
index 7fd2c87..7c34c6a 100644
--- a/libs/utils/Asset.cpp
+++ b/libs/utils/Asset.cpp
@@ -210,7 +210,7 @@
     offset = ftell(fp);
     fclose(fp);
     if (!scanResult) {
-        LOGD("File '%s' is not in gzip format\n", fileName);
+        ALOGD("File '%s' is not in gzip format\n", fileName);
         ::close(fd);
         return NULL;
     }
@@ -384,12 +384,12 @@
     fileLength = lseek64(fd, 0, SEEK_END);
     if (fileLength == (off64_t) -1) {
         // probably a bad file descriptor
-        LOGD("failed lseek (errno=%d)\n", errno);
+        ALOGD("failed lseek (errno=%d)\n", errno);
         return UNKNOWN_ERROR;
     }
 
     if ((off64_t) (offset + length) > fileLength) {
-        LOGD("start (%ld) + len (%ld) > end (%ld)\n",
+        ALOGD("start (%ld) + len (%ld) > end (%ld)\n",
             (long) offset, (long) length, (long) fileLength);
         return BAD_INDEX;
     }
diff --git a/libs/utils/AssetManager.cpp b/libs/utils/AssetManager.cpp
index 203e6fa..e7c4d47 100644
--- a/libs/utils/AssetManager.cpp
+++ b/libs/utils/AssetManager.cpp
@@ -283,7 +283,7 @@
 bool AssetManager::createIdmapFileLocked(const String8& originalPath, const String8& overlayPath,
                                          const String8& idmapPath)
 {
-    LOGD("%s: originalPath=%s overlayPath=%s idmapPath=%s\n",
+    ALOGD("%s: originalPath=%s overlayPath=%s idmapPath=%s\n",
          __FUNCTION__, originalPath.string(), overlayPath.string(), idmapPath.string());
     ResTable tables[2];
     const String8* paths[2] = { &originalPath, &overlayPath };
@@ -923,7 +923,7 @@
              */
             if (found) {
                 if (pAsset == NULL)
-                    LOGD("Expected file not found: '%s'\n", path.string());
+                    ALOGD("Expected file not found: '%s'\n", path.string());
                 return pAsset;
             }
         }
@@ -1333,7 +1333,7 @@
                 //printf("+++ no match on '%s'\n", (const char*) match);
             }
 
-            LOGD("HEY: size=%d removing %d\n", (int)pContents->size(), i);
+            ALOGD("HEY: size=%d removing %d\n", (int)pContents->size(), i);
             pContents->removeAt(i);
             i--;        // adjust "for" loop
             count--;    //  and loop limit
@@ -1652,7 +1652,7 @@
 
 #ifdef DO_TIMINGS
     timer.stop();
-    LOGD("Cache scan took %.3fms\n",
+    ALOGD("Cache scan took %.3fms\n",
         timer.durationUsecs() / 1000.0);
 #endif
 
@@ -1784,7 +1784,7 @@
     mZipFile = new ZipFileRO;
     ALOGV("+++ opening zip '%s'\n", mPath.string());
     if (mZipFile->open(mPath.string()) != NO_ERROR) {
-        LOGD("failed to open Zip archive '%s'\n", mPath.string());
+        ALOGD("failed to open Zip archive '%s'\n", mPath.string());
         delete mZipFile;
         mZipFile = NULL;
     }
diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp
index 8791263..5afe2dc 100644
--- a/libs/utils/BackupData.cpp
+++ b/libs/utils/BackupData.cpp
@@ -112,8 +112,8 @@
         k = key;
     }
     if (DEBUG) {
-        LOGD("Writing header: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(), key.string(),
-                dataSize);
+        ALOGD("Writing header: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(),
+                key.string(), dataSize);
     }
 
     entity_header_v1 header;
@@ -151,11 +151,11 @@
 status_t
 BackupDataWriter::WriteEntityData(const void* data, size_t size)
 {
-    if (DEBUG) LOGD("Writing data: size=%lu", (unsigned long) size);
+    if (DEBUG) ALOGD("Writing data: size=%lu", (unsigned long) size);
 
     if (m_status != NO_ERROR) {
         if (DEBUG) {
-            LOGD("Not writing data - stream in error state %d (%s)", m_status, strerror(m_status));
+            ALOGD("Not writing data - stream in error state %d (%s)", m_status, strerror(m_status));
         }
         return m_status;
     }
@@ -166,7 +166,7 @@
     ssize_t amt = write(m_fd, data, size);
     if (amt != (ssize_t)size) {
         m_status = errno;
-        if (DEBUG) LOGD("write returned error %d (%s)", m_status, strerror(m_status));
+        if (DEBUG) ALOGD("write returned error %d (%s)", m_status, strerror(m_status));
         return m_status;
     }
     m_pos += amt;
@@ -208,7 +208,7 @@
                 m_done = true; \
             } else { \
                 m_status = errno; \
-                LOGD("CHECK_SIZE(a=%ld e=%ld) failed at line %d m_status='%s'", \
+                ALOGD("CHECK_SIZE(a=%ld e=%ld) failed at line %d m_status='%s'", \
                     long(actual), long(expected), __LINE__, strerror(m_status)); \
             } \
             return m_status; \
@@ -218,7 +218,7 @@
     do { \
         status_t err = skip_padding(); \
         if (err != NO_ERROR) { \
-            LOGD("SKIP_PADDING FAILED at line %d", __LINE__); \
+            ALOGD("SKIP_PADDING FAILED at line %d", __LINE__); \
             m_status = err; \
             return err; \
         } \
@@ -261,7 +261,7 @@
         {
             m_header.entity.keyLen = fromlel(m_header.entity.keyLen);
             if (m_header.entity.keyLen <= 0) {
-                LOGD("Entity header at %d has keyLen<=0: 0x%08x\n", (int)m_pos,
+                ALOGD("Entity header at %d has keyLen<=0: 0x%08x\n", (int)m_pos,
                         (int)m_header.entity.keyLen);
                 m_status = EINVAL;
             }
@@ -285,7 +285,7 @@
             break;
         }
         default:
-            LOGD("Chunk header at %d has invalid type: 0x%08x",
+            ALOGD("Chunk header at %d has invalid type: 0x%08x",
                     (int)(m_pos - sizeof(m_header)), (int)m_header.type);
             m_status = EINVAL;
     }
@@ -339,7 +339,7 @@
         return -1;
     }
     int remaining = m_dataEndPos - m_pos;
-    //LOGD("ReadEntityData size=%d m_pos=0x%x m_dataEndPos=0x%x remaining=%d\n",
+    //ALOGD("ReadEntityData size=%d m_pos=0x%x m_dataEndPos=0x%x remaining=%d\n",
     //        size, m_pos, m_dataEndPos, remaining);
     if (remaining <= 0) {
         return 0;
@@ -347,7 +347,7 @@
     if (((int)size) > remaining) {
         size = remaining;
     }
-    //LOGD("   reading %d bytes", size);
+    //ALOGD("   reading %d bytes", size);
     int amt = read(m_fd, data, size);
     if (amt < 0) {
         m_status = errno;
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp
index 7ef30f9..aee7ff0 100644
--- a/libs/utils/BackupHelpers.cpp
+++ b/libs/utils/BackupHelpers.cpp
@@ -74,7 +74,7 @@
 #if TEST_BACKUP_HELPERS
 #define LOGP(f, x...) printf(f "\n", x)
 #else
-#define LOGP(x...) LOGD(x)
+#define LOGP(x...) ALOGD(x)
 #endif
 #endif
 
diff --git a/libs/utils/CallStack.cpp b/libs/utils/CallStack.cpp
index c2a5e55..18fd84f 100644
--- a/libs/utils/CallStack.cpp
+++ b/libs/utils/CallStack.cpp
@@ -104,7 +104,7 @@
         char line[MAX_BACKTRACE_LINE_LENGTH];
         format_backtrace_line(i, &mStack[i], &symbols[i],
                 line, MAX_BACKTRACE_LINE_LENGTH);
-        LOGD("%s%s", prefix, line);
+        ALOGD("%s%s", prefix, line);
     }
     free_backtrace_symbols(symbols, mCount);
 }
diff --git a/libs/utils/FileMap.cpp b/libs/utils/FileMap.cpp
index 294f7b6..b2a61f1 100644
--- a/libs/utils/FileMap.cpp
+++ b/libs/utils/FileMap.cpp
@@ -64,12 +64,12 @@
     }
 #ifdef HAVE_POSIX_FILEMAP    
     if (mBasePtr && munmap(mBasePtr, mBaseLength) != 0) {
-        LOGD("munmap(%p, %d) failed\n", mBasePtr, (int) mBaseLength);
+        ALOGD("munmap(%p, %d) failed\n", mBasePtr, (int) mBaseLength);
     }
 #endif
 #ifdef HAVE_WIN32_FILEMAP
     if (mBasePtr && UnmapViewOfFile(mBasePtr) == 0) {
-        LOGD("UnmapViewOfFile(%p) failed, error = %ld\n", mBasePtr, 
+        ALOGD("UnmapViewOfFile(%p) failed, error = %ld\n", mBasePtr,
               GetLastError() );
     }
     if (mFileMapping != INVALID_HANDLE_VALUE) {
diff --git a/libs/utils/Looper.cpp b/libs/utils/Looper.cpp
index b54fb9d..1bc92cf 100644
--- a/libs/utils/Looper.cpp
+++ b/libs/utils/Looper.cpp
@@ -185,7 +185,7 @@
                 int events = response.events;
                 void* data = response.request.data;
 #if DEBUG_POLL_AND_WAKE
-                LOGD("%p ~ pollOnce - returning signalled identifier %d: "
+                ALOGD("%p ~ pollOnce - returning signalled identifier %d: "
                         "fd=%d, events=0x%x, data=%p",
                         this, ident, fd, events, data);
 #endif
@@ -198,7 +198,7 @@
 
         if (result != 0) {
 #if DEBUG_POLL_AND_WAKE
-            LOGD("%p ~ pollOnce - returning result %d", this, result);
+            ALOGD("%p ~ pollOnce - returning result %d", this, result);
 #endif
             if (outFd != NULL) *outFd = 0;
             if (outEvents != NULL) *outEvents = NULL;
@@ -212,7 +212,7 @@
 
 int Looper::pollInner(int timeoutMillis) {
 #if DEBUG_POLL_AND_WAKE
-    LOGD("%p ~ pollOnce - waiting: timeoutMillis=%d", this, timeoutMillis);
+    ALOGD("%p ~ pollOnce - waiting: timeoutMillis=%d", this, timeoutMillis);
 #endif
 
     // Adjust the timeout based on when the next message is due.
@@ -224,7 +224,7 @@
             timeoutMillis = messageTimeoutMillis;
         }
 #if DEBUG_POLL_AND_WAKE
-        LOGD("%p ~ pollOnce - next message in %lldns, adjusted timeout: timeoutMillis=%d",
+        ALOGD("%p ~ pollOnce - next message in %lldns, adjusted timeout: timeoutMillis=%d",
                 this, mNextMessageUptime - now, timeoutMillis);
 #endif
     }
@@ -270,7 +270,7 @@
     // Check for poll timeout.
     if (eventCount == 0) {
 #if DEBUG_POLL_AND_WAKE
-        LOGD("%p ~ pollOnce - timeout", this);
+        ALOGD("%p ~ pollOnce - timeout", this);
 #endif
         result = ALOOPER_POLL_TIMEOUT;
         goto Done;
@@ -278,7 +278,7 @@
 
     // Handle all events.
 #if DEBUG_POLL_AND_WAKE
-    LOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount);
+    ALOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount);
 #endif
 
 #ifdef LOOPER_USES_EPOLL
@@ -353,7 +353,7 @@
                 - milliseconds_to_nanoseconds(timeoutMillis);
     }
     if (mSampledPolls == SAMPLED_POLLS_TO_AGGREGATE) {
-        LOGD("%p ~ poll latency statistics: %0.3fms zero timeout, %0.3fms non-zero timeout", this,
+        ALOGD("%p ~ poll latency statistics: %0.3fms zero timeout, %0.3fms non-zero timeout", this,
                 0.000001f * float(mSampledZeroPollLatencySum) / mSampledZeroPollCount,
                 0.000001f * float(mSampledTimeoutPollLatencySum) / mSampledTimeoutPollCount);
         mSampledPolls = 0;
@@ -382,7 +382,7 @@
                 mLock.unlock();
 
 #if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
-                LOGD("%p ~ pollOnce - sending message: handler=%p, what=%d",
+                ALOGD("%p ~ pollOnce - sending message: handler=%p, what=%d",
                         this, handler.get(), message.what);
 #endif
                 handler->handleMessage(message);
@@ -410,7 +410,7 @@
             int events = response.events;
             void* data = response.request.data;
 #if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS
-            LOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p",
+            ALOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p",
                     this, callback, fd, events, data);
 #endif
             int callbackResult = callback(fd, events, data);
@@ -451,7 +451,7 @@
 
 void Looper::wake() {
 #if DEBUG_POLL_AND_WAKE
-    LOGD("%p ~ wake", this);
+    ALOGD("%p ~ wake", this);
 #endif
 
 #ifdef LOOPER_STATISTICS
@@ -475,12 +475,12 @@
 
 void Looper::awoken() {
 #if DEBUG_POLL_AND_WAKE
-    LOGD("%p ~ awoken", this);
+    ALOGD("%p ~ awoken", this);
 #endif
 
 #ifdef LOOPER_STATISTICS
     if (mPendingWakeCount == 0) {
-        LOGD("%p ~ awoken: spurious!", this);
+        ALOGD("%p ~ awoken: spurious!", this);
     } else {
         mSampledWakeCycles += 1;
         mSampledWakeCountSum += mPendingWakeCount;
@@ -488,7 +488,7 @@
         mPendingWakeCount = 0;
         mPendingWakeTime = -1;
         if (mSampledWakeCycles == SAMPLED_WAKE_CYCLES_TO_AGGREGATE) {
-            LOGD("%p ~ wake statistics: %0.3fms wake latency, %0.3f wakes per cycle", this,
+            ALOGD("%p ~ wake statistics: %0.3fms wake latency, %0.3f wakes per cycle", this,
                     0.000001f * float(mSampledWakeLatencySum) / mSampledWakeCycles,
                     float(mSampledWakeCountSum) / mSampledWakeCycles);
             mSampledWakeCycles = 0;
@@ -514,7 +514,7 @@
 
 int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data) {
 #if DEBUG_CALLBACKS
-    LOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident,
+    ALOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident,
             events, callback, data);
 #endif
 
@@ -598,7 +598,7 @@
 
 int Looper::removeFd(int fd) {
 #if DEBUG_CALLBACKS
-    LOGD("%p ~ removeFd - fd=%d", this, fd);
+    ALOGD("%p ~ removeFd - fd=%d", this, fd);
 #endif
 
 #ifdef LOOPER_USES_EPOLL
@@ -675,7 +675,7 @@
 void Looper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler,
         const Message& message) {
 #if DEBUG_CALLBACKS
-    LOGD("%p ~ sendMessageAtTime - uptime=%lld, handler=%p, what=%d",
+    ALOGD("%p ~ sendMessageAtTime - uptime=%lld, handler=%p, what=%d",
             this, uptime, handler.get(), message.what);
 #endif
 
@@ -708,7 +708,7 @@
 
 void Looper::removeMessages(const sp<MessageHandler>& handler) {
 #if DEBUG_CALLBACKS
-    LOGD("%p ~ removeMessages - handler=%p", this, handler.get());
+    ALOGD("%p ~ removeMessages - handler=%p", this, handler.get());
 #endif
 
     { // acquire lock
@@ -725,7 +725,7 @@
 
 void Looper::removeMessages(const sp<MessageHandler>& handler, int what) {
 #if DEBUG_CALLBACKS
-    LOGD("%p ~ removeMessages - handler=%p, what=%d", this, handler.get(), what);
+    ALOGD("%p ~ removeMessages - handler=%p, what=%d", this, handler.get(), what);
 #endif
 
     { // acquire lock
diff --git a/libs/utils/PropertyMap.cpp b/libs/utils/PropertyMap.cpp
index d472d45..99603ab 100644
--- a/libs/utils/PropertyMap.cpp
+++ b/libs/utils/PropertyMap.cpp
@@ -135,7 +135,7 @@
             status = parser.parse();
 #if DEBUG_PARSER_PERFORMANCE
             nsecs_t elapsedTime = systemTime(SYSTEM_TIME_MONOTONIC) - startTime;
-            LOGD("Parsed property file '%s' %d lines in %0.3fms.",
+            ALOGD("Parsed property file '%s' %d lines in %0.3fms.",
                     tokenizer->getFilename().string(), tokenizer->getLineNumber(),
                     elapsedTime / 1000000.0);
 #endif
@@ -163,7 +163,7 @@
 status_t PropertyMap::Parser::parse() {
     while (!mTokenizer->isEof()) {
 #if DEBUG_PARSER
-        LOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
+        ALOGD("Parsing %s: '%s'.", mTokenizer->getLocation().string(),
                 mTokenizer->peekRemainderOfLine().string());
 #endif
 
diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp
index 959b382..0b7dd92 100644
--- a/libs/utils/RefBase.cpp
+++ b/libs/utils/RefBase.cpp
@@ -103,7 +103,7 @@
             ref_entry* refs = mStrongRefs;
             while (refs) {
                 char inc = refs->ref >= 0 ? '+' : '-';
-                LOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
+                ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
 #if DEBUG_REFS_CALLSTACK_ENABLED
                 refs->stack.dump();
 #endif
@@ -121,7 +121,7 @@
             ref_entry* refs = mWeakRefs;
             while (refs) {
                 char inc = refs->ref >= 0 ? '+' : '-';
-                LOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
+                ALOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref);
 #if DEBUG_REFS_CALLSTACK_ENABLED
                 refs->stack.dump();
 #endif
@@ -137,13 +137,13 @@
     }
 
     void addStrongRef(const void* id) {
-        //LOGD_IF(mTrackEnabled,
+        //ALOGD_IF(mTrackEnabled,
         //        "addStrongRef: RefBase=%p, id=%p", mBase, id);
         addRef(&mStrongRefs, id, mStrong);
     }
 
     void removeStrongRef(const void* id) {
-        //LOGD_IF(mTrackEnabled,
+        //ALOGD_IF(mTrackEnabled,
         //        "removeStrongRef: RefBase=%p, id=%p", mBase, id);
         if (!mRetain) {
             removeRef(&mStrongRefs, id);
@@ -153,7 +153,7 @@
     }
 
     void renameStrongRefId(const void* old_id, const void* new_id) {
-        //LOGD_IF(mTrackEnabled,
+        //ALOGD_IF(mTrackEnabled,
         //        "renameStrongRefId: RefBase=%p, oid=%p, nid=%p",
         //        mBase, old_id, new_id);
         renameRefsId(mStrongRefs, old_id, new_id);
@@ -203,7 +203,7 @@
             if (rc >= 0) {
                 write(rc, text.string(), text.length());
                 close(rc);
-                LOGD("STACK TRACE for %p saved in %s", this, name);
+                ALOGD("STACK TRACE for %p saved in %s", this, name);
             }
             else LOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
                       name, strerror(errno));
@@ -270,7 +270,7 @@
             ref = head;
             while (ref) {
                 char inc = ref->ref >= 0 ? '+' : '-';
-                LOGD("\t%c ID %p (ref %d):", inc, ref->id, ref->ref);
+                ALOGD("\t%c ID %p (ref %d):", inc, ref->id, ref->ref);
                 ref = ref->next;
             }
 
@@ -334,7 +334,7 @@
     const int32_t c = android_atomic_inc(&refs->mStrong);
     LOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs);
 #if PRINT_REFS
-    LOGD("incStrong of %p from %p: cnt=%d\n", this, id, c);
+    ALOGD("incStrong of %p from %p: cnt=%d\n", this, id, c);
 #endif
     if (c != INITIAL_STRONG_VALUE)  {
         return;
@@ -350,7 +350,7 @@
     refs->removeStrongRef(id);
     const int32_t c = android_atomic_dec(&refs->mStrong);
 #if PRINT_REFS
-    LOGD("decStrong of %p from %p: cnt=%d\n", this, id, c);
+    ALOGD("decStrong of %p from %p: cnt=%d\n", this, id, c);
 #endif
     LOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs);
     if (c == 1) {
@@ -372,7 +372,7 @@
     LOG_ASSERT(c >= 0, "forceIncStrong called on %p after ref count underflow",
                refs);
 #if PRINT_REFS
-    LOGD("forceIncStrong of %p from %p: cnt=%d\n", this, id, c);
+    ALOGD("forceIncStrong of %p from %p: cnt=%d\n", this, id, c);
 #endif
 
     switch (c) {
@@ -487,7 +487,7 @@
     impl->addStrongRef(id);
 
 #if PRINT_REFS
-    LOGD("attemptIncStrong of %p from %p: cnt=%d\n", this, id, curCount);
+    ALOGD("attemptIncStrong of %p from %p: cnt=%d\n", this, id, curCount);
 #endif
 
     if (curCount == INITIAL_STRONG_VALUE) {
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index 6a9e91d..559afd8 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -4368,7 +4368,7 @@
             }
 #if 0
             if (overlayResID != 0) {
-                LOGD("%s/%s 0x%08x -> 0x%08x\n",
+                ALOGD("%s/%s 0x%08x -> 0x%08x\n",
                      String8(String16(resName.type)).string(),
                      String8(String16(resName.name)).string(),
                      resID, overlayResID);
diff --git a/libs/utils/StopWatch.cpp b/libs/utils/StopWatch.cpp
index b5dda2f..595aec3 100644
--- a/libs/utils/StopWatch.cpp
+++ b/libs/utils/StopWatch.cpp
@@ -39,11 +39,11 @@
 {
     nsecs_t elapsed = elapsedTime();
     const int n = mNumLaps;
-    LOGD("StopWatch %s (us): %lld ", mName, ns2us(elapsed));
+    ALOGD("StopWatch %s (us): %lld ", mName, ns2us(elapsed));
     for (int i=0 ; i<n ; i++) {
         const nsecs_t soFar = mLaps[i].soFar;
         const nsecs_t thisLap = mLaps[i].thisLap;
-        LOGD(" [%d: %lld, %lld]", i, ns2us(soFar), ns2us(thisLap));
+        ALOGD(" [%d: %lld, %lld]", i, ns2us(soFar), ns2us(thisLap));
     }
 }
 
diff --git a/libs/utils/SystemClock.cpp b/libs/utils/SystemClock.cpp
index 062e6d7..89a052f 100644
--- a/libs/utils/SystemClock.cpp
+++ b/libs/utils/SystemClock.cpp
@@ -64,7 +64,7 @@
     tv.tv_sec = (time_t) (millis / 1000LL);
     tv.tv_usec = (suseconds_t) ((millis % 1000LL) * 1000LL);
 
-    LOGD("Setting time of day to sec=%d\n", (int) tv.tv_sec);
+    ALOGD("Setting time of day to sec=%d\n", (int) tv.tv_sec);
 
 #ifdef HAVE_ANDROID_OS
     fd = open("/dev/alarm", O_RDWR);
diff --git a/libs/utils/Tokenizer.cpp b/libs/utils/Tokenizer.cpp
index b3445b7..68752b4 100644
--- a/libs/utils/Tokenizer.cpp
+++ b/libs/utils/Tokenizer.cpp
@@ -118,7 +118,7 @@
 
 String8 Tokenizer::nextToken(const char* delimiters) {
 #if DEBUG_TOKENIZER
-    LOGD("nextToken");
+    ALOGD("nextToken");
 #endif
     const char* end = getEnd();
     const char* tokenStart = mCurrent;
@@ -134,7 +134,7 @@
 
 void Tokenizer::nextLine() {
 #if DEBUG_TOKENIZER
-    LOGD("nextLine");
+    ALOGD("nextLine");
 #endif
     const char* end = getEnd();
     while (mCurrent != end) {
@@ -148,7 +148,7 @@
 
 void Tokenizer::skipDelimiters(const char* delimiters) {
 #if DEBUG_TOKENIZER
-    LOGD("skipDelimiters");
+    ALOGD("skipDelimiters");
 #endif
     const char* end = getEnd();
     while (mCurrent != end) {
diff --git a/libs/utils/ZipFileRO.cpp b/libs/utils/ZipFileRO.cpp
index d880f55..3069352 100644
--- a/libs/utils/ZipFileRO.cpp
+++ b/libs/utils/ZipFileRO.cpp
@@ -269,7 +269,7 @@
         }
     }
     if (i < 0) {
-        LOGD("Zip: EOCD not found, %s is not zip\n", mFileName);
+        ALOGD("Zip: EOCD not found, %s is not zip\n", mFileName);
         free(scanBuf);
         return false;
     }
diff --git a/libs/utils/ZipUtils.cpp b/libs/utils/ZipUtils.cpp
index 76725b4..cc5c68a 100644
--- a/libs/utils/ZipUtils.cpp
+++ b/libs/utils/ZipUtils.cpp
@@ -100,7 +100,7 @@
 
             int cc = read(fd, readBuf, getSize);
             if (cc != (int) getSize) {
-                LOGD("inflate read failed (%d vs %ld)\n",
+                ALOGD("inflate read failed (%d vs %ld)\n",
                     cc, getSize);
                 goto z_bail;
             }
@@ -114,7 +114,7 @@
         /* uncompress the data */
         zerr = inflate(&zstream, Z_NO_FLUSH);
         if (zerr != Z_OK && zerr != Z_STREAM_END) {
-            LOGD("zlib inflate call failed (zerr=%d)\n", zerr);
+            ALOGD("zlib inflate call failed (zerr=%d)\n", zerr);
             goto z_bail;
         }
 
@@ -212,7 +212,7 @@
 
             int cc = fread(readBuf, 1, getSize, fp);
             if (cc != (int) getSize) {
-                LOGD("inflate read failed (%d vs %ld)\n",
+                ALOGD("inflate read failed (%d vs %ld)\n",
                     cc, getSize);
                 goto z_bail;
             }
@@ -226,7 +226,7 @@
         /* uncompress the data */
         zerr = inflate(&zstream, Z_NO_FLUSH);
         if (zerr != Z_OK && zerr != Z_STREAM_END) {
-            LOGD("zlib inflate call failed (zerr=%d)\n", zerr);
+            ALOGD("zlib inflate call failed (zerr=%d)\n", zerr);
             goto z_bail;
         }
 
diff --git a/libs/utils/tests/BasicHashtable_test.cpp b/libs/utils/tests/BasicHashtable_test.cpp
index 764082d..7dcf750 100644
--- a/libs/utils/tests/BasicHashtable_test.cpp
+++ b/libs/utils/tests/BasicHashtable_test.cpp
@@ -156,7 +156,7 @@
 
 template <typename TKey, typename TValue>
 static void dump(BasicHashtable<TKey, key_value_pair_t<TKey, TValue> >& h) {
-    LOGD("hashtable %p, size=%u, capacity=%u, bucketCount=%u",
+    ALOGD("hashtable %p, size=%u, capacity=%u, bucketCount=%u",
             &h, h.size(), h.capacity(), h.bucketCount());
     for (size_t i = 0; i < h.bucketCount(); i++) {
         bool collision, present;
@@ -165,11 +165,11 @@
         if (present) {
             int key, value;
             getKeyValue(h.entryAt(i), &key, &value);
-            LOGD("  [%3u] = collision=%d, present=%d, hash=0x%08x, key=%3d, value=%3d, "
+            ALOGD("  [%3u] = collision=%d, present=%d, hash=0x%08x, key=%3d, value=%3d, "
                     "hash_type(key)=0x%08x",
                     i, collision, present, hash, key, value, hash_type(key));
         } else {
-            LOGD("  [%3u] = collision=%d, present=%d",
+            ALOGD("  [%3u] = collision=%d, present=%d",
                     i, collision, present);
         }
     }