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/camera/Camera.cpp b/camera/Camera.cpp
index da21d1a..eef1dd2 100644
--- a/camera/Camera.cpp
+++ b/camera/Camera.cpp
@@ -178,7 +178,7 @@
     if (surface != 0) {
         return c->setPreviewDisplay(surface);
     } else {
-        LOGD("app passed NULL surface");
+        ALOGD("app passed NULL surface");
         return c->setPreviewDisplay(0);
     }
 }
@@ -192,7 +192,7 @@
     if (surfaceTexture != 0) {
         return c->setPreviewTexture(surfaceTexture);
     } else {
-        LOGD("app passed NULL surface");
+        ALOGD("app passed NULL surface");
         return c->setPreviewTexture(0);
     }
 }
diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp
index c6087b4..209d84a 100644
--- a/camera/CameraParameters.cpp
+++ b/camera/CameraParameters.cpp
@@ -449,12 +449,12 @@
 
 void CameraParameters::dump() const
 {
-    LOGD("dump: mMap.size = %d", mMap.size());
+    ALOGD("dump: mMap.size = %d", mMap.size());
     for (size_t i = 0; i < mMap.size(); i++) {
         String8 k, v;
         k = mMap.keyAt(i);
         v = mMap.valueAt(i);
-        LOGD("%s: %s\n", k.string(), v.string());
+        ALOGD("%s: %s\n", k.string(), v.string());
     }
 }
 
diff --git a/drm/libdrmframework/plugins/common/util/src/MimeTypeUtil.cpp b/drm/libdrmframework/plugins/common/util/src/MimeTypeUtil.cpp
index 57ef799..576ed15 100644
--- a/drm/libdrmframework/plugins/common/util/src/MimeTypeUtil.cpp
+++ b/drm/libdrmframework/plugins/common/util/src/MimeTypeUtil.cpp
@@ -24,7 +24,7 @@
 
 #ifdef DRM_OMA_FL_ENGINE_DEBUG
 #define LOG_NDEBUG 0
-#define LOG_DEBUG(...) LOGD(__VA_ARGS__)
+#define LOG_DEBUG(...) ALOGD(__VA_ARGS__)
 #else
 #define LOG_DEBUG(...)
 #endif
diff --git a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
index 976978f..0ffc0a7 100644
--- a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
+++ b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
@@ -58,7 +58,7 @@
 
 DrmConstraints* DrmPassthruPlugIn::onGetConstraints(
         int uniqueId, const String8* path, int action) {
-    LOGD("DrmPassthruPlugIn::onGetConstraints From Path: %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onGetConstraints From Path: %d", uniqueId);
     DrmConstraints* drmConstraints = new DrmConstraints();
 
     String8 value("dummy_available_time");
@@ -73,7 +73,7 @@
 }
 
 DrmInfoStatus* DrmPassthruPlugIn::onProcessDrmInfo(int uniqueId, const DrmInfo* drmInfo) {
-    LOGD("DrmPassthruPlugIn::onProcessDrmInfo - Enter : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onProcessDrmInfo - Enter : %d", uniqueId);
     DrmInfoStatus* drmInfoStatus = NULL;
     if (NULL != drmInfo) {
         switch (drmInfo->getInfoType()) {
@@ -102,28 +102,28 @@
         }
         }
     }
-    LOGD("DrmPassthruPlugIn::onProcessDrmInfo - Exit");
+    ALOGD("DrmPassthruPlugIn::onProcessDrmInfo - Exit");
     return drmInfoStatus;
 }
 
 status_t DrmPassthruPlugIn::onSetOnInfoListener(
             int uniqueId, const IDrmEngine::OnInfoListener* infoListener) {
-    LOGD("DrmPassthruPlugIn::onSetOnInfoListener : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onSetOnInfoListener : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 status_t DrmPassthruPlugIn::onInitialize(int uniqueId) {
-    LOGD("DrmPassthruPlugIn::onInitialize : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onInitialize : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 status_t DrmPassthruPlugIn::onTerminate(int uniqueId) {
-    LOGD("DrmPassthruPlugIn::onTerminate : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onTerminate : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 DrmSupportInfo* DrmPassthruPlugIn::onGetSupportInfo(int uniqueId) {
-    LOGD("DrmPassthruPlugIn::onGetSupportInfo : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onGetSupportInfo : %d", uniqueId);
     DrmSupportInfo* drmSupportInfo = new DrmSupportInfo();
     // Add mimetype's
     drmSupportInfo->addMimeType(String8("application/vnd.passthru.drm"));
@@ -136,12 +136,12 @@
 
 status_t DrmPassthruPlugIn::onSaveRights(int uniqueId, const DrmRights& drmRights,
             const String8& rightsPath, const String8& contentPath) {
-    LOGD("DrmPassthruPlugIn::onSaveRights : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onSaveRights : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 DrmInfo* DrmPassthruPlugIn::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest) {
-    LOGD("DrmPassthruPlugIn::onAcquireDrmInfo : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onAcquireDrmInfo : %d", uniqueId);
     DrmInfo* drmInfo = NULL;
 
     if (NULL != drmInfoRequest) {
@@ -157,65 +157,65 @@
 }
 
 bool DrmPassthruPlugIn::onCanHandle(int uniqueId, const String8& path) {
-    LOGD("DrmPassthruPlugIn::canHandle: %s ", path.string());
+    ALOGD("DrmPassthruPlugIn::canHandle: %s ", path.string());
     String8 extension = path.getPathExtension();
     extension.toLower();
     return (String8(".passthru") == extension);
 }
 
 String8 DrmPassthruPlugIn::onGetOriginalMimeType(int uniqueId, const String8& path) {
-    LOGD("DrmPassthruPlugIn::onGetOriginalMimeType() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onGetOriginalMimeType() : %d", uniqueId);
     return String8("video/passthru");
 }
 
 int DrmPassthruPlugIn::onGetDrmObjectType(
             int uniqueId, const String8& path, const String8& mimeType) {
-    LOGD("DrmPassthruPlugIn::onGetDrmObjectType() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onGetDrmObjectType() : %d", uniqueId);
     return DrmObjectType::UNKNOWN;
 }
 
 int DrmPassthruPlugIn::onCheckRightsStatus(int uniqueId, const String8& path, int action) {
-    LOGD("DrmPassthruPlugIn::onCheckRightsStatus() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onCheckRightsStatus() : %d", uniqueId);
     int rightsStatus = RightsStatus::RIGHTS_VALID;
     return rightsStatus;
 }
 
 status_t DrmPassthruPlugIn::onConsumeRights(int uniqueId, DecryptHandle* decryptHandle,
             int action, bool reserve) {
-    LOGD("DrmPassthruPlugIn::onConsumeRights() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onConsumeRights() : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 status_t DrmPassthruPlugIn::onSetPlaybackStatus(int uniqueId, DecryptHandle* decryptHandle,
             int playbackStatus, int64_t position) {
-    LOGD("DrmPassthruPlugIn::onSetPlaybackStatus() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onSetPlaybackStatus() : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 bool DrmPassthruPlugIn::onValidateAction(int uniqueId, const String8& path,
             int action, const ActionDescription& description) {
-    LOGD("DrmPassthruPlugIn::onValidateAction() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onValidateAction() : %d", uniqueId);
     return true;
 }
 
 status_t DrmPassthruPlugIn::onRemoveRights(int uniqueId, const String8& path) {
-    LOGD("DrmPassthruPlugIn::onRemoveRights() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onRemoveRights() : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 status_t DrmPassthruPlugIn::onRemoveAllRights(int uniqueId) {
-    LOGD("DrmPassthruPlugIn::onRemoveAllRights() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onRemoveAllRights() : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 status_t DrmPassthruPlugIn::onOpenConvertSession(int uniqueId, int convertId) {
-    LOGD("DrmPassthruPlugIn::onOpenConvertSession() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onOpenConvertSession() : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 DrmConvertedStatus* DrmPassthruPlugIn::onConvertData(
             int uniqueId, int convertId, const DrmBuffer* inputData) {
-    LOGD("DrmPassthruPlugIn::onConvertData() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onConvertData() : %d", uniqueId);
     DrmBuffer* convertedData = NULL;
 
     if (NULL != inputData && 0 < inputData->length) {
@@ -229,13 +229,13 @@
 }
 
 DrmConvertedStatus* DrmPassthruPlugIn::onCloseConvertSession(int uniqueId, int convertId) {
-    LOGD("DrmPassthruPlugIn::onCloseConvertSession() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onCloseConvertSession() : %d", uniqueId);
     return new DrmConvertedStatus(DrmConvertedStatus::STATUS_OK, NULL, 0 /*offset*/);
 }
 
 status_t DrmPassthruPlugIn::onOpenDecryptSession(
             int uniqueId, DecryptHandle* decryptHandle, int fd, off64_t offset, off64_t length) {
-    LOGD("DrmPassthruPlugIn::onOpenDecryptSession() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onOpenDecryptSession() : %d", uniqueId);
 
 #ifdef ENABLE_PASSTHRU_DECRYPTION
     decryptHandle->mimeType = String8("video/passthru");
@@ -254,7 +254,7 @@
 }
 
 status_t DrmPassthruPlugIn::onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle) {
-    LOGD("DrmPassthruPlugIn::onCloseDecryptSession() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onCloseDecryptSession() : %d", uniqueId);
     if (NULL != decryptHandle) {
         if (NULL != decryptHandle->decryptInfo) {
             delete decryptHandle->decryptInfo; decryptHandle->decryptInfo = NULL;
@@ -266,13 +266,13 @@
 
 status_t DrmPassthruPlugIn::onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle,
             int decryptUnitId, const DrmBuffer* headerInfo) {
-    LOGD("DrmPassthruPlugIn::onInitializeDecryptUnit() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onInitializeDecryptUnit() : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 status_t DrmPassthruPlugIn::onDecrypt(int uniqueId, DecryptHandle* decryptHandle,
             int decryptUnitId, const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) {
-    LOGD("DrmPassthruPlugIn::onDecrypt() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onDecrypt() : %d", uniqueId);
     /**
      * As a workaround implementation passthru would copy the given
      * encrypted buffer as it is to decrypted buffer. Note, decBuffer
@@ -287,13 +287,13 @@
 
 status_t DrmPassthruPlugIn::onFinalizeDecryptUnit(
             int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId) {
-    LOGD("DrmPassthruPlugIn::onFinalizeDecryptUnit() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onFinalizeDecryptUnit() : %d", uniqueId);
     return DRM_NO_ERROR;
 }
 
 ssize_t DrmPassthruPlugIn::onPread(int uniqueId, DecryptHandle* decryptHandle,
             void* buffer, ssize_t numBytes, off64_t offset) {
-    LOGD("DrmPassthruPlugIn::onPread() : %d", uniqueId);
+    ALOGD("DrmPassthruPlugIn::onPread() : %d", uniqueId);
     return 0;
 }
 
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index b9a5bc5..61d0dad 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -190,7 +190,7 @@
 float AudioSystem::linearToLog(int volume)
 {
     // float v = volume ? exp(float(100 - volume) * dBConvert) : 0;
-    // LOGD("linearToLog(%d)=%f", volume, v);
+    // ALOGD("linearToLog(%d)=%f", volume, v);
     // return v;
     return volume ? exp(float(100 - volume) * dBConvert) : 0;
 }
@@ -198,7 +198,7 @@
 int AudioSystem::logToLinear(float volume)
 {
     // int v = volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0;
-    // LOGD("logTolinear(%d)=%f", v, volume);
+    // ALOGD("logTolinear(%d)=%f", v, volume);
     // return v;
     return volume ? 100 - int(dBConvertInverse * log(volume) + 0.5) : 0;
 }
diff --git a/media/libmedia/MediaScanner.cpp b/media/libmedia/MediaScanner.cpp
index b304f8c..cda185f 100644
--- a/media/libmedia/MediaScanner.cpp
+++ b/media/libmedia/MediaScanner.cpp
@@ -135,7 +135,7 @@
     struct dirent* entry;
 
     if (shouldSkipDirectory(path)) {
-      LOGD("Skipping: %s", path);
+      ALOGD("Skipping: %s", path);
       return MEDIA_SCAN_RESULT_OK;
     }
 
@@ -199,7 +199,7 @@
                 type = DT_DIR;
             }
         } else {
-            LOGD("stat() failed for %s: %s", path, strerror(errno) );
+            ALOGD("stat() failed for %s: %s", path, strerror(errno) );
         }
     }
     if (type == DT_DIR) {
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 5853144..695c4a8 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -201,7 +201,7 @@
 
 status_t MediaPlayer::setMetadataFilter(const Parcel& filter)
 {
-    LOGD("setMetadataFilter");
+    ALOGD("setMetadataFilter");
     Mutex::Autolock lock(mLock);
     if (mPlayer == NULL) {
         return NO_INIT;
@@ -211,7 +211,7 @@
 
 status_t MediaPlayer::getMetadata(bool update_only, bool apply_filter, Parcel *metadata)
 {
-    LOGD("getMetadata");
+    ALOGD("getMetadata");
     Mutex::Autolock lock(mLock);
     if (mPlayer == NULL) {
         return NO_INIT;
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 27d8c03..487c433 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -489,7 +489,7 @@
     mUID = uid;
 
 #if CALLBACK_ANTAGONIZER
-    LOGD("create Antagonizer");
+    ALOGD("create Antagonizer");
     mAntagonizer = new Antagonizer(notify, this);
 #endif
 }
@@ -523,7 +523,7 @@
     if (p != 0) {
         p->setNotifyCallback(0, 0);
 #if CALLBACK_ANTAGONIZER
-        LOGD("kill Antagonizer");
+        ALOGD("kill Antagonizer");
         mAntagonizer->kill();
 #endif
         p->reset();
@@ -925,7 +925,7 @@
     if (p == 0) return UNKNOWN_ERROR;
     status_t ret = p->prepareAsync();
 #if CALLBACK_ANTAGONIZER
-    LOGD("start Antagonizer");
+    ALOGD("start Antagonizer");
     if (ret == NO_ERROR) mAntagonizer->start();
 #endif
     return ret;
@@ -1131,7 +1131,7 @@
 
 int Antagonizer::callbackThread(void* user)
 {
-    LOGD("Antagonizer started");
+    ALOGD("Antagonizer started");
     Antagonizer* p = reinterpret_cast<Antagonizer*>(user);
     while (!p->mExit) {
         if (p->mActive) {
@@ -1142,7 +1142,7 @@
     }
     Mutex::Autolock _l(p->mLock);
     p->mCondition.signal();
-    LOGD("Antagonizer stopped");
+    ALOGD("Antagonizer stopped");
     return 0;
 }
 #endif
@@ -1160,7 +1160,7 @@
     // If the application wants to decode those, it should open a
     // filedescriptor for them and use that.
     if (url != NULL && strncmp(url, "http://", 7) != 0) {
-        LOGD("Can't decode %s by path, use filedescriptor instead", url);
+        ALOGD("Can't decode %s by path, use filedescriptor instead", url);
         return mem;
     }
 
@@ -1347,7 +1347,7 @@
 
     // Check argument "bufferCount" against the mininum buffer count
     if (bufferCount < mMinBufferCount) {
-        LOGD("bufferCount (%d) is too small and increased to %d", bufferCount, mMinBufferCount);
+        ALOGD("bufferCount (%d) is too small and increased to %d", bufferCount, mMinBufferCount);
         bufferCount = mMinBufferCount;
 
     }
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 964cb1f..6fb16f5 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -2256,7 +2256,7 @@
 status_t AwesomePlayer::setCacheStatCollectFreq(const Parcel &request) {
     if (mCachedSource != NULL) {
         int32_t freqMs = request.readInt32();
-        LOGD("Request to keep cache stats in the past %d ms",
+        ALOGD("Request to keep cache stats in the past %d ms",
             freqMs);
         return mCachedSource->setCacheStatCollectFreq(freqMs);
     }
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 927e122..080faa6 100755
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -254,7 +254,7 @@
     *isSetVideoSizeSupported = true;
     params.getSupportedVideoSizes(sizes);
     if (sizes.size() == 0) {
-        LOGD("Camera does not support setVideoSize()");
+        ALOGD("Camera does not support setVideoSize()");
         params.getSupportedPreviewSizes(sizes);
         *isSetVideoSizeSupported = false;
     }
@@ -633,7 +633,7 @@
 }
 
 status_t CameraSource::stop() {
-    LOGD("stop: E");
+    ALOGD("stop: E");
     Mutex::Autolock autoLock(mLock);
     mStarted = false;
     mFrameAvailableCondition.signal();
@@ -670,7 +670,7 @@
     }
 
     CHECK_EQ(mNumFramesReceived, mNumFramesEncoded + mNumFramesDropped);
-    LOGD("stop: X");
+    ALOGD("stop: X");
     return OK;
 }
 
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 4f6c8d1..22c3182 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -69,7 +69,7 @@
       mSkipCurrentFrame(false) {
 
     mTimeBetweenFrameCaptureUs = timeBetweenFrameCaptureUs;
-    LOGD("starting time lapse mode: %lld us",
+    ALOGD("starting time lapse mode: %lld us",
         mTimeBetweenFrameCaptureUs);
 
     mVideoWidth = videoSize.width;
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index dfee281..a368e0a 100755
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -539,7 +539,7 @@
 }
 
 void MPEG4Writer::stopWriterThread() {
-    LOGD("Stopping writer thread");
+    ALOGD("Stopping writer thread");
     if (!mWriterThreadStarted) {
         return;
     }
@@ -554,7 +554,7 @@
     void *dummy;
     pthread_join(mThread, &dummy);
     mWriterThreadStarted = false;
-    LOGD("Writer thread stopped");
+    ALOGD("Writer thread stopped");
 }
 
 /*
@@ -650,7 +650,7 @@
     }
 
     if (mTracks.size() > 1) {
-        LOGD("Duration from tracks range is [%lld, %lld] us",
+        ALOGD("Duration from tracks range is [%lld, %lld] us",
             minDurationUs, maxDurationUs);
     }
 
@@ -1338,7 +1338,7 @@
     sendSessionSummary();
 
     mChunkInfos.clear();
-    LOGD("%d chunks are written in the last batch", outstandingChunks);
+    ALOGD("%d chunks are written in the last batch", outstandingChunks);
 }
 
 bool MPEG4Writer::findChunkToWrite(Chunk *chunk) {
@@ -1523,7 +1523,7 @@
 }
 
 status_t MPEG4Writer::Track::stop() {
-    LOGD("Stopping %s track", mIsAudio? "Audio": "Video");
+    ALOGD("Stopping %s track", mIsAudio? "Audio": "Video");
     if (!mStarted) {
         LOGE("Stop() called but track is not started");
         return ERROR_END_OF_STREAM;
@@ -1539,7 +1539,7 @@
 
     status_t err = (status_t) dummy;
 
-    LOGD("Stopping %s track source", mIsAudio? "Audio": "Video");
+    ALOGD("Stopping %s track source", mIsAudio? "Audio": "Video");
     {
         status_t status = mSource->stop();
         if (err == OK && status != OK && status != ERROR_END_OF_STREAM) {
@@ -1547,7 +1547,7 @@
         }
     }
 
-    LOGD("%s track stopped", mIsAudio? "Audio": "Video");
+    ALOGD("%s track stopped", mIsAudio? "Audio": "Video");
     return err;
 }
 
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index 8a8d493..b370225 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -72,7 +72,7 @@
             {
                 char* manufacturerName = usb_device_get_manufacturer_name(device);
                 char* productName = usb_device_get_product_name(device);
-                LOGD("Found camera: \"%s\" \"%s\"\n", manufacturerName, productName);
+                ALOGD("Found camera: \"%s\" \"%s\"\n", manufacturerName, productName);
                 free(manufacturerName);
                 free(productName);
             } else if (interface->bInterfaceClass == 0xFF &&
@@ -90,7 +90,7 @@
                 // Looks like an android style MTP device
                 char* manufacturerName = usb_device_get_manufacturer_name(device);
                 char* productName = usb_device_get_product_name(device);
-                LOGD("Found MTP device: \"%s\" \"%s\"\n", manufacturerName, productName);
+                ALOGD("Found MTP device: \"%s\" \"%s\"\n", manufacturerName, productName);
                 free(manufacturerName);
                 free(productName);
             }
@@ -666,7 +666,7 @@
 
 // reads the object's data and writes it to the specified file path
 bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int group, int perm) {
-    LOGD("readObject: %s", destPath);
+    ALOGD("readObject: %s", destPath);
     int fd = ::open(destPath, O_RDWR | O_CREAT | O_TRUNC);
     if (fd < 0) {
         LOGE("open failed for %s", destPath);
@@ -790,7 +790,7 @@
     ALOGV("readData returned %d\n", ret);
     if (ret >= MTP_CONTAINER_HEADER_SIZE) {
         if (mData.getContainerType() == MTP_CONTAINER_TYPE_RESPONSE) {
-            LOGD("got response packet instead of data packet");
+            ALOGD("got response packet instead of data packet");
             // we got a response packet rather than data
             // copy it to mResponse
             mResponse.copyFrom(mData);
@@ -827,7 +827,7 @@
         mResponse.dump();
         return mResponse.getResponseCode();
     } else {
-        LOGD("readResponse failed\n");
+        ALOGD("readResponse failed\n");
         return -1;
     }
 }
diff --git a/media/mtp/MtpObjectInfo.cpp b/media/mtp/MtpObjectInfo.cpp
index ea68c3b..cd15343 100644
--- a/media/mtp/MtpObjectInfo.cpp
+++ b/media/mtp/MtpObjectInfo.cpp
@@ -91,17 +91,17 @@
 }
 
 void MtpObjectInfo::print() {
-    LOGD("MtpObject Info %08X: %s\n", mHandle, mName);
-    LOGD("  mStorageID: %08X mFormat: %04X mProtectionStatus: %d\n",
+    ALOGD("MtpObject Info %08X: %s\n", mHandle, mName);
+    ALOGD("  mStorageID: %08X mFormat: %04X mProtectionStatus: %d\n",
             mStorageID, mFormat, mProtectionStatus);
-    LOGD("  mCompressedSize: %d mThumbFormat: %04X mThumbCompressedSize: %d\n",
+    ALOGD("  mCompressedSize: %d mThumbFormat: %04X mThumbCompressedSize: %d\n",
             mCompressedSize, mFormat, mThumbCompressedSize);
-    LOGD("  mThumbPixWidth: %d mThumbPixHeight: %d\n", mThumbPixWidth, mThumbPixHeight);
-    LOGD("  mImagePixWidth: %d mImagePixHeight: %d mImagePixDepth: %d\n",
+    ALOGD("  mThumbPixWidth: %d mThumbPixHeight: %d\n", mThumbPixWidth, mThumbPixHeight);
+    ALOGD("  mImagePixWidth: %d mImagePixHeight: %d mImagePixDepth: %d\n",
             mImagePixWidth, mImagePixHeight, mImagePixDepth);
-    LOGD("  mParent: %08X mAssociationType: %04X mAssociationDesc: %04X\n",
+    ALOGD("  mParent: %08X mAssociationType: %04X mAssociationDesc: %04X\n",
             mParent, mAssociationType, mAssociationDesc);
-    LOGD("  mSequenceNumber: %d mDateCreated: %ld mDateModified: %ld mKeywords: %s\n",
+    ALOGD("  mSequenceNumber: %d mDateCreated: %ld mDateModified: %ld mKeywords: %s\n",
             mSequenceNumber, mDateCreated, mDateModified, mKeywords);
 }
 
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index 1334e6c..838c13e 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -878,7 +878,7 @@
             return MTP_RESPONSE_OBJECT_TOO_LARGE;
     }
 
-LOGD("path: %s parent: %d storageID: %08X", (const char*)path, parent, storageID);
+    ALOGD("path: %s parent: %d storageID: %08X", (const char*)path, parent, storageID);
     MtpObjectHandle handle = mDatabase->beginSendObject((const char*)path,
             format, parent, storageID, mSendObjectFileSize, modifiedTime);
     if (handle == kInvalidObjectHandle) {
@@ -1104,7 +1104,7 @@
 
     // can't start writing past the end of the file
     if (offset > edit->mSize) {
-        LOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize);
+        ALOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize);
         return MTP_RESPONSE_GENERAL_ERROR;
     }
 
diff --git a/media/mtp/MtpStorageInfo.cpp b/media/mtp/MtpStorageInfo.cpp
index ca64ac0..dcd37cd 100644
--- a/media/mtp/MtpStorageInfo.cpp
+++ b/media/mtp/MtpStorageInfo.cpp
@@ -61,11 +61,11 @@
 }
 
 void MtpStorageInfo::print() {
-    LOGD("Storage Info %08X:\n\tmStorageType: %d\n\tmFileSystemType: %d\n\tmAccessCapability: %d\n",
+    ALOGD("Storage Info %08X:\n\tmStorageType: %d\n\tmFileSystemType: %d\n\tmAccessCapability: %d\n",
             mStorageID, mStorageType, mFileSystemType, mAccessCapability);
-    LOGD("\tmMaxCapacity: %lld\n\tmFreeSpaceBytes: %lld\n\tmFreeSpaceObjects: %d\n",
+    ALOGD("\tmMaxCapacity: %lld\n\tmFreeSpaceBytes: %lld\n\tmFreeSpaceObjects: %d\n",
             mMaxCapacity, mFreeSpaceBytes, mFreeSpaceObjects);
-    LOGD("\tmStorageDescription: %s\n\tmVolumeIdentifier: %s\n",
+    ALOGD("\tmStorageDescription: %s\n\tmVolumeIdentifier: %s\n",
             mStorageDescription, mVolumeIdentifier);
 }
 
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 2090f1b..275de77 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1956,7 +1956,7 @@
                         char value[PROPERTY_VALUE_MAX];
                         property_get("ro.audio.silent", value, "0");
                         if (atoi(value)) {
-                            LOGD("Silence is golden");
+                            ALOGD("Silence is golden");
                             setMasterMute(true);
                         }
                     }
@@ -2617,7 +2617,7 @@
                         char value[PROPERTY_VALUE_MAX];
                         property_get("ro.audio.silent", value, "0");
                         if (atoi(value)) {
-                            LOGD("Silence is golden");
+                            ALOGD("Silence is golden");
                             setMasterMute(true);
                         }
                     }
@@ -3011,7 +3011,7 @@
                         char value[PROPERTY_VALUE_MAX];
                         property_get("ro.audio.silent", value, "0");
                         if (atoi(value)) {
-                            LOGD("Silence is golden");
+                            ALOGD("Silence is golden");
                             setMasterMute(true);
                         }
                     }
@@ -3192,7 +3192,7 @@
 {
     ALOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size());
 
-    // LOGD("Creating track with %d buffers @ %d bytes", bufferCount, bufferSize);
+    // ALOGD("Creating track with %d buffers @ %d bytes", bufferCount, bufferSize);
    size_t size = sizeof(audio_track_cblk_t);
    uint8_t channelCount = popcount(channelMask);
    size_t bufferSize = frameCount*channelCount*sizeof(int16_t);
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 89f7b65..dc1d1a7 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -521,7 +521,7 @@
     const int32_t vlInc = t->volumeInc[0];
     const int32_t vrInc = t->volumeInc[1];
 
-    //LOGD("[0] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+    //ALOGD("[0] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
     //        t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
     //       (vl + vlInc*frameCount)/65536.0f, frameCount);
 
@@ -599,7 +599,7 @@
             const int32_t vlInc = t->volumeInc[0];
             const int32_t vrInc = t->volumeInc[1];
             const int32_t vaInc = t->auxInc;
-            // LOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+            // ALOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
             //        t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
             //        (vl + vlInc*frameCount)/65536.0f, frameCount);
 
@@ -643,7 +643,7 @@
             const int32_t vlInc = t->volumeInc[0];
             const int32_t vrInc = t->volumeInc[1];
 
-            // LOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+            // ALOGD("[1] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
             //        t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
             //        (vl + vlInc*frameCount)/65536.0f, frameCount);
 
@@ -688,7 +688,7 @@
             const int32_t vrInc = t->volumeInc[1];
             const int32_t vaInc = t->auxInc;
 
-            // LOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+            // ALOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
             //         t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
             //         (vl + vlInc*frameCount)/65536.0f, frameCount);
 
@@ -729,7 +729,7 @@
             const int32_t vlInc = t->volumeInc[0];
             const int32_t vrInc = t->volumeInc[1];
 
-            // LOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
+            // ALOGD("[2] %p: inc=%f, v0=%f, v1=%d, final=%f, count=%d",
             //         t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
             //         (vl + vlInc*frameCount)/65536.0f, frameCount);
 
diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp
index e945ce0..7205045 100644
--- a/services/audioflinger/AudioResampler.cpp
+++ b/services/audioflinger/AudioResampler.cpp
@@ -87,7 +87,7 @@
     char value[PROPERTY_VALUE_MAX];
     if (property_get("af.resampler.quality", value, 0)) {
         quality = atoi(value);
-        LOGD("forcing AudioResampler quality to %d", quality);
+        ALOGD("forcing AudioResampler quality to %d", quality);
     }
 
     if (quality == DEFAULT)
diff --git a/services/camera/libcameraservice/CameraHardwareStub.cpp b/services/camera/libcameraservice/CameraHardwareStub.cpp
index 8558fdd..f922630 100644
--- a/services/camera/libcameraservice/CameraHardwareStub.cpp
+++ b/services/camera/libcameraservice/CameraHardwareStub.cpp
@@ -70,7 +70,7 @@
 
     int preview_width, preview_height;
     mParameters.getPreviewSize(&preview_width, &preview_height);
-    LOGD("initHeapLocked: preview size=%dx%d", preview_width, preview_height);
+    ALOGD("initHeapLocked: preview size=%dx%d", preview_width, preview_height);
 
     // Note that we enforce yuv420sp in setParameters().
     int how_big = preview_width * preview_height * 3 / 2;
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 4760f07..d0cafb2 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -47,8 +47,8 @@
 // Use "adb shell dumpsys media.camera -v 1" to change it.
 static volatile int32_t gLogLevel = 0;
 
-#define LOG1(...) LOGD_IF(gLogLevel >= 1, __VA_ARGS__);
-#define LOG2(...) LOGD_IF(gLogLevel >= 2, __VA_ARGS__);
+#define LOG1(...) ALOGD_IF(gLogLevel >= 1, __VA_ARGS__);
+#define LOG2(...) ALOGD_IF(gLogLevel >= 2, __VA_ARGS__);
 
 static void setLogLevel(int level) {
     android_atomic_write(level, &gLogLevel);
diff --git a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
index e390ae2..69f60ca 100644
--- a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
+++ b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
@@ -46,7 +46,7 @@
     do { \
         printf(__VA_ARGS__); \
         printf("\n"); \
-        LOGD(__VA_ARGS__); \
+        ALOGD(__VA_ARGS__); \
     } while(0)
 
 void assert_fail(const char *file, int line, const char *func, const char *expr) {
@@ -797,7 +797,7 @@
         int w, h;
         const char *s = param.get(CameraParameters::KEY_SUPPORTED_PICTURE_SIZES);
         while (getNextSize(&s, &w, &h)) {
-            LOGD("checking picture size %dx%d", w, h);
+            ALOGD("checking picture size %dx%d", w, h);
             checkOnePicture(w, h);
         }
     }
@@ -811,7 +811,7 @@
 
         // Try all flag combinations.
         for (int v = 0; v < 8; v++) {
-            LOGD("TestPreviewCallbackFlag: flag=%d", v);
+            ALOGD("TestPreviewCallbackFlag: flag=%d", v);
             usleep(100000); // sleep a while to clear the in-flight callbacks.
             cc->clearStat();
             c->setPreviewCallbackFlag(v);
@@ -875,7 +875,7 @@
         int w, h;
         const char *s = param.get(CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES);
         while (getNextSize(&s, &w, &h)) {
-            LOGD("checking preview size %dx%d", w, h);
+            ALOGD("checking preview size %dx%d", w, h);
             checkOnePicture(w, h);
         }
     }