Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index 8949730..f5ed981 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -85,10 +85,10 @@
         int err;
         int i;
         err = framebuffer_open(module, &fbDev);
-        LOGE_IF(err, "couldn't open framebuffer HAL (%s)", strerror(-err));
+        ALOGE_IF(err, "couldn't open framebuffer HAL (%s)", strerror(-err));
         
         err = gralloc_open(module, &grDev);
-        LOGE_IF(err, "couldn't open gralloc HAL (%s)", strerror(-err));
+        ALOGE_IF(err, "couldn't open gralloc HAL (%s)", strerror(-err));
 
         // bail out if we can't initialize the modules
         if (!fbDev || !grDev)
@@ -113,7 +113,7 @@
                         fbDev->width, fbDev->height, fbDev->format,
                         GRALLOC_USAGE_HW_FB, &buffers[i]->handle, &buffers[i]->stride);
 
-                LOGE_IF(err, "fb buffer %d allocation failed w=%d, h=%d, err=%s",
+                ALOGE_IF(err, "fb buffer %d allocation failed w=%d, h=%d, err=%s",
                         i, fbDev->width, fbDev->height, strerror(-err));
 
                 if (err)
@@ -133,7 +133,7 @@
         const_cast<int&>(ANativeWindow::maxSwapInterval) = 
             fbDev->maxSwapInterval;
     } else {
-        LOGE("Couldn't get gralloc module");
+        ALOGE("Couldn't get gralloc module");
     }
 
     ANativeWindow::setSwapInterval = setSwapInterval;
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index 54a3ffa..f549a37 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -167,7 +167,7 @@
 {
     if (rect.left < 0 || rect.right  > this->width || 
         rect.top  < 0 || rect.bottom > this->height) {
-        LOGE("locking pixels (%d,%d,%d,%d) outside of buffer (w=%d, h=%d)",
+        ALOGE("locking pixels (%d,%d,%d,%d) outside of buffer (w=%d, h=%d)",
                 rect.left, rect.top, rect.right, rect.bottom, 
                 this->width, this->height);
         return BAD_VALUE;
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp
index 466fce6..d344737 100644
--- a/libs/ui/GraphicBufferAllocator.cpp
+++ b/libs/ui/GraphicBufferAllocator.cpp
@@ -38,7 +38,7 @@
 {
     hw_module_t const* module;
     int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
-    LOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
+    ALOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
     if (err == 0) {
         gralloc_open(module, &mAllocDev);
     }
diff --git a/libs/ui/GraphicBufferMapper.cpp b/libs/ui/GraphicBufferMapper.cpp
index ac53da8..b173c85 100644
--- a/libs/ui/GraphicBufferMapper.cpp
+++ b/libs/ui/GraphicBufferMapper.cpp
@@ -38,7 +38,7 @@
 {
     hw_module_t const* module;
     int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
-    LOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
+    ALOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
     if (err == 0) {
         mAllocMod = (gralloc_module_t const *)module;
     }
diff --git a/libs/ui/InputTransport.cpp b/libs/ui/InputTransport.cpp
index 00716d7..09cbb31 100644
--- a/libs/ui/InputTransport.cpp
+++ b/libs/ui/InputTransport.cpp
@@ -88,12 +88,12 @@
     int serverAshmemFd = ashmem_create_region(ashmemName.string(), DEFAULT_MESSAGE_BUFFER_SIZE);
     if (serverAshmemFd < 0) {
         result = -errno;
-        LOGE("channel '%s' ~ Could not create shared memory region. errno=%d",
+        ALOGE("channel '%s' ~ Could not create shared memory region. errno=%d",
                 name.string(), errno);
     } else {
         result = ashmem_set_prot_region(serverAshmemFd, PROT_READ | PROT_WRITE);
         if (result < 0) {
-            LOGE("channel '%s' ~ Error %d trying to set protection of ashmem fd %d.",
+            ALOGE("channel '%s' ~ Error %d trying to set protection of ashmem fd %d.",
                     name.string(), result, serverAshmemFd);
         } else {
             // Dup the file descriptor because the server and client input channel objects that
@@ -102,19 +102,19 @@
             clientAshmemFd = dup(serverAshmemFd);
             if (clientAshmemFd < 0) {
                 result = -errno;
-                LOGE("channel '%s' ~ Could not dup() shared memory region fd. errno=%d",
+                ALOGE("channel '%s' ~ Could not dup() shared memory region fd. errno=%d",
                         name.string(), errno);
             } else {
                 int forward[2];
                 if (pipe(forward)) {
                     result = -errno;
-                    LOGE("channel '%s' ~ Could not create forward pipe.  errno=%d",
+                    ALOGE("channel '%s' ~ Could not create forward pipe.  errno=%d",
                             name.string(), errno);
                 } else {
                     int reverse[2];
                     if (pipe(reverse)) {
                         result = -errno;
-                        LOGE("channel '%s' ~ Could not create reverse pipe.  errno=%d",
+                        ALOGE("channel '%s' ~ Could not create reverse pipe.  errno=%d",
                                 name.string(), errno);
                     } else {
                         String8 serverChannelName = name;
@@ -220,7 +220,7 @@
     int ashmemFd = mChannel->getAshmemFd();
     int result = ashmem_get_size_region(ashmemFd);
     if (result < 0) {
-        LOGE("channel '%s' publisher ~ Error %d getting size of ashmem fd %d.",
+        ALOGE("channel '%s' publisher ~ Error %d getting size of ashmem fd %d.",
                 mChannel->getName().string(), result, ashmemFd);
         return UNKNOWN_ERROR;
     }
@@ -229,7 +229,7 @@
     mSharedMessage = static_cast<InputMessage*>(mmap(NULL, mAshmemSize,
             PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0));
     if (! mSharedMessage) {
-        LOGE("channel '%s' publisher ~ mmap failed on ashmem fd %d.",
+        ALOGE("channel '%s' publisher ~ mmap failed on ashmem fd %d.",
                 mChannel->getName().string(), ashmemFd);
         return NO_MEMORY;
     }
@@ -253,7 +253,7 @@
             if (mSharedMessage->consumed) {
                 result = sem_post(& mSharedMessage->semaphore);
                 if (result < 0) {
-                    LOGE("channel '%s' publisher ~ Error %d in sem_post.",
+                    ALOGE("channel '%s' publisher ~ Error %d in sem_post.",
                             mChannel->getName().string(), errno);
                     return UNKNOWN_ERROR;
                 }
@@ -261,7 +261,7 @@
 
             result = sem_destroy(& mSharedMessage->semaphore);
             if (result < 0) {
-                LOGE("channel '%s' publisher ~ Error %d in sem_destroy.",
+                ALOGE("channel '%s' publisher ~ Error %d in sem_destroy.",
                         mChannel->getName().string(), errno);
                 return UNKNOWN_ERROR;
             }
@@ -273,7 +273,7 @@
         int ashmemFd = mChannel->getAshmemFd();
         result = ashmem_unpin_region(ashmemFd, 0, 0);
         if (result < 0) {
-            LOGE("channel '%s' publisher ~ Error %d unpinning ashmem fd %d.",
+            ALOGE("channel '%s' publisher ~ Error %d unpinning ashmem fd %d.",
                     mChannel->getName().string(), result, ashmemFd);
             return UNKNOWN_ERROR;
         }
@@ -291,7 +291,7 @@
         int32_t deviceId,
         int32_t source) {
     if (mPinned) {
-        LOGE("channel '%s' publisher ~ Attempted to publish a new event but publisher has "
+        ALOGE("channel '%s' publisher ~ Attempted to publish a new event but publisher has "
                 "not yet been reset.", mChannel->getName().string());
         return INVALID_OPERATION;
     }
@@ -302,7 +302,7 @@
     int ashmemFd = mChannel->getAshmemFd();
     int result = ashmem_pin_region(ashmemFd, 0, 0);
     if (result < 0) {
-        LOGE("channel '%s' publisher ~ Error %d pinning ashmem fd %d.",
+        ALOGE("channel '%s' publisher ~ Error %d pinning ashmem fd %d.",
                 mChannel->getName().string(), result, ashmemFd);
         return UNKNOWN_ERROR;
     }
@@ -311,7 +311,7 @@
 
     result = sem_init(& mSharedMessage->semaphore, 1, 1);
     if (result < 0) {
-        LOGE("channel '%s' publisher ~ Error %d in sem_init.",
+        ALOGE("channel '%s' publisher ~ Error %d in sem_init.",
                 mChannel->getName().string(), errno);
         return UNKNOWN_ERROR;
     }
@@ -390,7 +390,7 @@
 #endif
 
     if (pointerCount > MAX_POINTERS || pointerCount < 1) {
-        LOGE("channel '%s' publisher ~ Invalid number of pointers provided: %d.",
+        ALOGE("channel '%s' publisher ~ Invalid number of pointers provided: %d.",
                 mChannel->getName().string(), pointerCount);
         return BAD_VALUE;
     }
@@ -444,7 +444,7 @@
 #endif
 
     if (! mPinned || ! mMotionEventSampleDataTail) {
-        LOGE("channel '%s' publisher ~ Cannot append motion sample because there is no current "
+        ALOGE("channel '%s' publisher ~ Cannot append motion sample because there is no current "
                 "AMOTION_EVENT_ACTION_MOVE or AMOTION_EVENT_ACTION_HOVER_MOVE event.",
                 mChannel->getName().string());
         return INVALID_OPERATION;
@@ -478,7 +478,7 @@
 #endif
                 return FAILED_TRANSACTION;
             } else {
-                LOGE("channel '%s' publisher ~ Error %d in sem_trywait.",
+                ALOGE("channel '%s' publisher ~ Error %d in sem_trywait.",
                         mChannel->getName().string(), errno);
                 return UNKNOWN_ERROR;
             }
@@ -496,7 +496,7 @@
     if (mWasDispatched) {
         result = sem_post(& mSharedMessage->semaphore);
         if (result < 0) {
-            LOGE("channel '%s' publisher ~ Error %d in sem_post.",
+            ALOGE("channel '%s' publisher ~ Error %d in sem_post.",
                     mChannel->getName().string(), errno);
             return UNKNOWN_ERROR;
         }
@@ -531,7 +531,7 @@
     } else if (signal == INPUT_SIGNAL_FINISHED_UNHANDLED) {
         *outHandled = false;
     } else {
-        LOGE("channel '%s' publisher ~ Received unexpected signal '%c' from consumer",
+        ALOGE("channel '%s' publisher ~ Received unexpected signal '%c' from consumer",
                 mChannel->getName().string(), signal);
         return UNKNOWN_ERROR;
     }
@@ -559,7 +559,7 @@
     int ashmemFd = mChannel->getAshmemFd();
     int result = ashmem_get_size_region(ashmemFd);
     if (result < 0) {
-        LOGE("channel '%s' consumer ~ Error %d getting size of ashmem fd %d.",
+        ALOGE("channel '%s' consumer ~ Error %d getting size of ashmem fd %d.",
                 mChannel->getName().string(), result, ashmemFd);
         return UNKNOWN_ERROR;
     }
@@ -569,7 +569,7 @@
     mSharedMessage = static_cast<InputMessage*>(mmap(NULL, mAshmemSize,
             PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0));
     if (! mSharedMessage) {
-        LOGE("channel '%s' consumer ~ mmap failed on ashmem fd %d.",
+        ALOGE("channel '%s' consumer ~ mmap failed on ashmem fd %d.",
                 mChannel->getName().string(), ashmemFd);
         return NO_MEMORY;
     }
@@ -589,19 +589,19 @@
     int result = ashmem_pin_region(ashmemFd, 0, 0);
     if (result != ASHMEM_NOT_PURGED) {
         if (result == ASHMEM_WAS_PURGED) {
-            LOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d because it was purged "
+            ALOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d because it was purged "
                     "which probably indicates that the publisher and consumer are out of sync.",
                     mChannel->getName().string(), result, ashmemFd);
             return INVALID_OPERATION;
         }
 
-        LOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d.",
+        ALOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d.",
                 mChannel->getName().string(), result, ashmemFd);
         return UNKNOWN_ERROR;
     }
 
     if (mSharedMessage->consumed) {
-        LOGE("channel '%s' consumer ~ The current message has already been consumed.",
+        ALOGE("channel '%s' consumer ~ The current message has already been consumed.",
                 mChannel->getName().string());
         return INVALID_OPERATION;
     }
@@ -611,7 +611,7 @@
     // consumed).  Eventually the publisher will reinitialize the semaphore for the next message.
     result = sem_wait(& mSharedMessage->semaphore);
     if (result < 0) {
-        LOGE("channel '%s' consumer ~ Error %d in sem_wait.",
+        ALOGE("channel '%s' consumer ~ Error %d in sem_wait.",
                 mChannel->getName().string(), errno);
         return UNKNOWN_ERROR;
     }
@@ -640,7 +640,7 @@
     }
 
     default:
-        LOGE("channel '%s' consumer ~ Received message of unknown type %d",
+        ALOGE("channel '%s' consumer ~ Received message of unknown type %d",
                 mChannel->getName().string(), mSharedMessage->type);
         return UNKNOWN_ERROR;
     }
@@ -671,7 +671,7 @@
         return result;
     }
     if (signal != INPUT_SIGNAL_DISPATCH) {
-        LOGE("channel '%s' consumer ~ Received unexpected signal '%c' from publisher",
+        ALOGE("channel '%s' consumer ~ Received unexpected signal '%c' from publisher",
                 mChannel->getName().string(), signal);
         return UNKNOWN_ERROR;
     }
diff --git a/libs/ui/KeyCharacterMap.cpp b/libs/ui/KeyCharacterMap.cpp
index e1d5e8b..485234c 100644
--- a/libs/ui/KeyCharacterMap.cpp
+++ b/libs/ui/KeyCharacterMap.cpp
@@ -95,11 +95,11 @@
     Tokenizer* tokenizer;
     status_t status = Tokenizer::open(filename, &tokenizer);
     if (status) {
-        LOGE("Error %d opening key character map file %s.", status, filename.string());
+        ALOGE("Error %d opening key character map file %s.", status, filename.string());
     } else {
         KeyCharacterMap* map = new KeyCharacterMap();
         if (!map) {
-            LOGE("Error allocating key character map.");
+            ALOGE("Error allocating key character map.");
             status = NO_MEMORY;
         } else {
 #if DEBUG_PARSER_PERFORMANCE
@@ -474,7 +474,7 @@
                     status_t status = parseKey();
                     if (status) return status;
                 } else {
-                    LOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
+                    ALOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
                             keywordToken.string());
                     return BAD_VALUE;
                 }
@@ -490,7 +490,7 @@
 
             mTokenizer->skipDelimiters(WHITESPACE);
             if (!mTokenizer->isEol()) {
-                LOGE("%s: Expected end of line, got '%s'.",
+                ALOGE("%s: Expected end of line, got '%s'.",
                         mTokenizer->getLocation().string(),
                         mTokenizer->peekRemainderOfLine().string());
                 return BAD_VALUE;
@@ -501,13 +501,13 @@
     }
 
     if (mState != STATE_TOP) {
-        LOGE("%s: Unterminated key description at end of file.",
+        ALOGE("%s: Unterminated key description at end of file.",
                 mTokenizer->getLocation().string());
         return BAD_VALUE;
     }
 
     if (mMap->mType == KEYBOARD_TYPE_UNKNOWN) {
-        LOGE("%s: Missing required keyboard 'type' declaration.",
+        ALOGE("%s: Missing required keyboard 'type' declaration.",
                 mTokenizer->getLocation().string());
         return BAD_VALUE;
     }
@@ -517,7 +517,7 @@
 
 status_t KeyCharacterMap::Parser::parseType() {
     if (mMap->mType != KEYBOARD_TYPE_UNKNOWN) {
-        LOGE("%s: Duplicate keyboard 'type' declaration.",
+        ALOGE("%s: Duplicate keyboard 'type' declaration.",
                 mTokenizer->getLocation().string());
         return BAD_VALUE;
     }
@@ -535,7 +535,7 @@
     } else if (typeToken == "SPECIAL_FUNCTION") {
         type = KEYBOARD_TYPE_SPECIAL_FUNCTION;
     } else {
-        LOGE("%s: Expected keyboard type label, got '%s'.", mTokenizer->getLocation().string(),
+        ALOGE("%s: Expected keyboard type label, got '%s'.", mTokenizer->getLocation().string(),
                 typeToken.string());
         return BAD_VALUE;
     }
@@ -551,12 +551,12 @@
     String8 keyCodeToken = mTokenizer->nextToken(WHITESPACE);
     int32_t keyCode = getKeyCodeByLabel(keyCodeToken.string());
     if (!keyCode) {
-        LOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
+        ALOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
                 keyCodeToken.string());
         return BAD_VALUE;
     }
     if (mMap->mKeys.indexOfKey(keyCode) >= 0) {
-        LOGE("%s: Duplicate entry for key code '%s'.", mTokenizer->getLocation().string(),
+        ALOGE("%s: Duplicate entry for key code '%s'.", mTokenizer->getLocation().string(),
                 keyCodeToken.string());
         return BAD_VALUE;
     }
@@ -564,7 +564,7 @@
     mTokenizer->skipDelimiters(WHITESPACE);
     String8 openBraceToken = mTokenizer->nextToken(WHITESPACE);
     if (openBraceToken != "{") {
-        LOGE("%s: Expected '{' after key code label, got '%s'.",
+        ALOGE("%s: Expected '{' after key code label, got '%s'.",
                 mTokenizer->getLocation().string(), openBraceToken.string());
         return BAD_VALUE;
     }
@@ -597,7 +597,7 @@
             int32_t metaState;
             status_t status = parseModifier(token, &metaState);
             if (status) {
-                LOGE("%s: Expected a property name or modifier, got '%s'.",
+                ALOGE("%s: Expected a property name or modifier, got '%s'.",
                         mTokenizer->getLocation().string(), token.string());
                 return status;
             }
@@ -616,7 +616,7 @@
             }
         }
 
-        LOGE("%s: Expected ',' or ':' after property name.",
+        ALOGE("%s: Expected ',' or ':' after property name.",
                 mTokenizer->getLocation().string());
         return BAD_VALUE;
     }
@@ -634,12 +634,12 @@
             char16_t character;
             status_t status = parseCharacterLiteral(&character);
             if (status || !character) {
-                LOGE("%s: Invalid character literal for key.",
+                ALOGE("%s: Invalid character literal for key.",
                         mTokenizer->getLocation().string());
                 return BAD_VALUE;
             }
             if (haveCharacter) {
-                LOGE("%s: Cannot combine multiple character literals or 'none'.",
+                ALOGE("%s: Cannot combine multiple character literals or 'none'.",
                         mTokenizer->getLocation().string());
                 return BAD_VALUE;
             }
@@ -649,7 +649,7 @@
             token = mTokenizer->nextToken(WHITESPACE);
             if (token == "none") {
                 if (haveCharacter) {
-                    LOGE("%s: Cannot combine multiple character literals or 'none'.",
+                    ALOGE("%s: Cannot combine multiple character literals or 'none'.",
                             mTokenizer->getLocation().string());
                     return BAD_VALUE;
                 }
@@ -659,20 +659,20 @@
                 token = mTokenizer->nextToken(WHITESPACE);
                 int32_t keyCode = getKeyCodeByLabel(token.string());
                 if (!keyCode) {
-                    LOGE("%s: Invalid key code label for fallback behavior, got '%s'.",
+                    ALOGE("%s: Invalid key code label for fallback behavior, got '%s'.",
                             mTokenizer->getLocation().string(),
                             token.string());
                     return BAD_VALUE;
                 }
                 if (haveFallback) {
-                    LOGE("%s: Cannot combine multiple fallback key codes.",
+                    ALOGE("%s: Cannot combine multiple fallback key codes.",
                             mTokenizer->getLocation().string());
                     return BAD_VALUE;
                 }
                 behavior.fallbackKeyCode = keyCode;
                 haveFallback = true;
             } else {
-                LOGE("%s: Expected a key behavior after ':'.",
+                ALOGE("%s: Expected a key behavior after ':'.",
                         mTokenizer->getLocation().string());
                 return BAD_VALUE;
             }
@@ -688,7 +688,7 @@
         switch (property.property) {
         case PROPERTY_LABEL:
             if (key->label) {
-                LOGE("%s: Duplicate label for key.",
+                ALOGE("%s: Duplicate label for key.",
                         mTokenizer->getLocation().string());
                 return BAD_VALUE;
             }
@@ -699,7 +699,7 @@
             break;
         case PROPERTY_NUMBER:
             if (key->number) {
-                LOGE("%s: Duplicate number for key.",
+                ALOGE("%s: Duplicate number for key.",
                         mTokenizer->getLocation().string());
                 return BAD_VALUE;
             }
@@ -711,7 +711,7 @@
         case PROPERTY_META: {
             for (Behavior* b = key->firstBehavior; b; b = b->next) {
                 if (b->metaState == property.metaState) {
-                    LOGE("%s: Duplicate key behavior for modifier.",
+                    ALOGE("%s: Duplicate key behavior for modifier.",
                             mTokenizer->getLocation().string());
                     return BAD_VALUE;
                 }
@@ -757,7 +757,7 @@
                 return BAD_VALUE;
             }
             if (combinedMeta & metaState) {
-                LOGE("%s: Duplicate modifier combination '%s'.",
+                ALOGE("%s: Duplicate modifier combination '%s'.",
                         mTokenizer->getLocation().string(), token.string());
                 return BAD_VALUE;
             }
@@ -831,7 +831,7 @@
     }
 
 Error:
-    LOGE("%s: Malformed character literal.", mTokenizer->getLocation().string());
+    ALOGE("%s: Malformed character literal.", mTokenizer->getLocation().string());
     return BAD_VALUE;
 }
 
diff --git a/libs/ui/KeyLayoutMap.cpp b/libs/ui/KeyLayoutMap.cpp
index 7ba654a..44a9420 100644
--- a/libs/ui/KeyLayoutMap.cpp
+++ b/libs/ui/KeyLayoutMap.cpp
@@ -53,11 +53,11 @@
     Tokenizer* tokenizer;
     status_t status = Tokenizer::open(filename, &tokenizer);
     if (status) {
-        LOGE("Error %d opening key layout map file %s.", status, filename.string());
+        ALOGE("Error %d opening key layout map file %s.", status, filename.string());
     } else {
         KeyLayoutMap* map = new KeyLayoutMap();
         if (!map) {
-            LOGE("Error allocating key layout map.");
+            ALOGE("Error allocating key layout map.");
             status = NO_MEMORY;
         } else {
 #if DEBUG_PARSER_PERFORMANCE
@@ -164,14 +164,14 @@
                 status_t status = parseAxis();
                 if (status) return status;
             } else {
-                LOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
+                ALOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
                         keywordToken.string());
                 return BAD_VALUE;
             }
 
             mTokenizer->skipDelimiters(WHITESPACE);
             if (!mTokenizer->isEol()) {
-                LOGE("%s: Expected end of line, got '%s'.",
+                ALOGE("%s: Expected end of line, got '%s'.",
                         mTokenizer->getLocation().string(),
                         mTokenizer->peekRemainderOfLine().string());
                 return BAD_VALUE;
@@ -188,12 +188,12 @@
     char* end;
     int32_t scanCode = int32_t(strtol(scanCodeToken.string(), &end, 0));
     if (*end) {
-        LOGE("%s: Expected key scan code number, got '%s'.", mTokenizer->getLocation().string(),
+        ALOGE("%s: Expected key scan code number, got '%s'.", mTokenizer->getLocation().string(),
                 scanCodeToken.string());
         return BAD_VALUE;
     }
     if (mMap->mKeys.indexOfKey(scanCode) >= 0) {
-        LOGE("%s: Duplicate entry for key scan code '%s'.", mTokenizer->getLocation().string(),
+        ALOGE("%s: Duplicate entry for key scan code '%s'.", mTokenizer->getLocation().string(),
                 scanCodeToken.string());
         return BAD_VALUE;
     }
@@ -202,7 +202,7 @@
     String8 keyCodeToken = mTokenizer->nextToken(WHITESPACE);
     int32_t keyCode = getKeyCodeByLabel(keyCodeToken.string());
     if (!keyCode) {
-        LOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
+        ALOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
                 keyCodeToken.string());
         return BAD_VALUE;
     }
@@ -215,12 +215,12 @@
         String8 flagToken = mTokenizer->nextToken(WHITESPACE);
         uint32_t flag = getKeyFlagByLabel(flagToken.string());
         if (!flag) {
-            LOGE("%s: Expected key flag label, got '%s'.", mTokenizer->getLocation().string(),
+            ALOGE("%s: Expected key flag label, got '%s'.", mTokenizer->getLocation().string(),
                     flagToken.string());
             return BAD_VALUE;
         }
         if (flags & flag) {
-            LOGE("%s: Duplicate key flag '%s'.", mTokenizer->getLocation().string(),
+            ALOGE("%s: Duplicate key flag '%s'.", mTokenizer->getLocation().string(),
                     flagToken.string());
             return BAD_VALUE;
         }
@@ -242,12 +242,12 @@
     char* end;
     int32_t scanCode = int32_t(strtol(scanCodeToken.string(), &end, 0));
     if (*end) {
-        LOGE("%s: Expected axis scan code number, got '%s'.", mTokenizer->getLocation().string(),
+        ALOGE("%s: Expected axis scan code number, got '%s'.", mTokenizer->getLocation().string(),
                 scanCodeToken.string());
         return BAD_VALUE;
     }
     if (mMap->mAxes.indexOfKey(scanCode) >= 0) {
-        LOGE("%s: Duplicate entry for axis scan code '%s'.", mTokenizer->getLocation().string(),
+        ALOGE("%s: Duplicate entry for axis scan code '%s'.", mTokenizer->getLocation().string(),
                 scanCodeToken.string());
         return BAD_VALUE;
     }
@@ -263,7 +263,7 @@
         String8 axisToken = mTokenizer->nextToken(WHITESPACE);
         axisInfo.axis = getAxisByLabel(axisToken.string());
         if (axisInfo.axis < 0) {
-            LOGE("%s: Expected inverted axis label, got '%s'.",
+            ALOGE("%s: Expected inverted axis label, got '%s'.",
                     mTokenizer->getLocation().string(), axisToken.string());
             return BAD_VALUE;
         }
@@ -274,7 +274,7 @@
         String8 splitToken = mTokenizer->nextToken(WHITESPACE);
         axisInfo.splitValue = int32_t(strtol(splitToken.string(), &end, 0));
         if (*end) {
-            LOGE("%s: Expected split value, got '%s'.",
+            ALOGE("%s: Expected split value, got '%s'.",
                     mTokenizer->getLocation().string(), splitToken.string());
             return BAD_VALUE;
         }
@@ -283,7 +283,7 @@
         String8 lowAxisToken = mTokenizer->nextToken(WHITESPACE);
         axisInfo.axis = getAxisByLabel(lowAxisToken.string());
         if (axisInfo.axis < 0) {
-            LOGE("%s: Expected low axis label, got '%s'.",
+            ALOGE("%s: Expected low axis label, got '%s'.",
                     mTokenizer->getLocation().string(), lowAxisToken.string());
             return BAD_VALUE;
         }
@@ -292,14 +292,14 @@
         String8 highAxisToken = mTokenizer->nextToken(WHITESPACE);
         axisInfo.highAxis = getAxisByLabel(highAxisToken.string());
         if (axisInfo.highAxis < 0) {
-            LOGE("%s: Expected high axis label, got '%s'.",
+            ALOGE("%s: Expected high axis label, got '%s'.",
                     mTokenizer->getLocation().string(), highAxisToken.string());
             return BAD_VALUE;
         }
     } else {
         axisInfo.axis = getAxisByLabel(token.string());
         if (axisInfo.axis < 0) {
-            LOGE("%s: Expected axis label, 'split' or 'invert', got '%s'.",
+            ALOGE("%s: Expected axis label, 'split' or 'invert', got '%s'.",
                     mTokenizer->getLocation().string(), token.string());
             return BAD_VALUE;
         }
@@ -316,12 +316,12 @@
             String8 flatToken = mTokenizer->nextToken(WHITESPACE);
             axisInfo.flatOverride = int32_t(strtol(flatToken.string(), &end, 0));
             if (*end) {
-                LOGE("%s: Expected flat value, got '%s'.",
+                ALOGE("%s: Expected flat value, got '%s'.",
                         mTokenizer->getLocation().string(), flatToken.string());
                 return BAD_VALUE;
             }
         } else {
-            LOGE("%s: Expected keyword 'flat', got '%s'.",
+            ALOGE("%s: Expected keyword 'flat', got '%s'.",
                     mTokenizer->getLocation().string(), keywordToken.string());
             return BAD_VALUE;
         }
diff --git a/libs/ui/Keyboard.cpp b/libs/ui/Keyboard.cpp
index 10bb39c..e4611f7 100644
--- a/libs/ui/Keyboard.cpp
+++ b/libs/ui/Keyboard.cpp
@@ -50,7 +50,7 @@
                 keyLayoutName)) {
             status_t status = loadKeyLayout(deviceIdenfifier, keyLayoutName);
             if (status == NAME_NOT_FOUND) {
-                LOGE("Configuration for keyboard device '%s' requested keyboard layout '%s' but "
+                ALOGE("Configuration for keyboard device '%s' requested keyboard layout '%s' but "
                         "it was not found.",
                         deviceIdenfifier.name.string(), keyLayoutName.string());
             }
@@ -61,7 +61,7 @@
                 keyCharacterMapName)) {
             status_t status = loadKeyCharacterMap(deviceIdenfifier, keyCharacterMapName);
             if (status == NAME_NOT_FOUND) {
-                LOGE("Configuration for keyboard device '%s' requested keyboard character "
+                ALOGE("Configuration for keyboard device '%s' requested keyboard character "
                         "map '%s' but it was not found.",
                         deviceIdenfifier.name.string(), keyLayoutName.string());
             }
@@ -90,7 +90,7 @@
     }
 
     // Give up!
-    LOGE("Could not determine key map for device '%s' and no default key maps were found!",
+    ALOGE("Could not determine key map for device '%s' and no default key maps were found!",
             deviceIdenfifier.name.string());
     return NAME_NOT_FOUND;
 }
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index d9ad863..8cd047a 100644
--- a/libs/ui/Region.cpp
+++ b/libs/ui/Region.cpp
@@ -69,7 +69,7 @@
 Region::Region(const void* buffer)
 {
     status_t err = read(buffer);
-    LOGE_IF(err<0, "error %s reading Region from buffer", strerror(err));
+    ALOGE_IF(err<0, "error %s reading Region from buffer", strerror(err));
 }
 
 Region::~Region()
@@ -338,15 +338,15 @@
         b.bottom = b.bottom > cur->bottom ? b.bottom : cur->bottom;
         if (cur->top == prev->top) {
             if (cur->bottom != prev->bottom) {
-                LOGE("%s: invalid span %p", name, cur);
+                ALOGE("%s: invalid span %p", name, cur);
                 result = false;
             } else if (cur->left < prev->right) {
-                LOGE("%s: spans overlap horizontally prev=%p, cur=%p",
+                ALOGE("%s: spans overlap horizontally prev=%p, cur=%p",
                         name, prev, cur);
                 result = false;
             }
         } else if (cur->top < prev->bottom) {
-            LOGE("%s: spans overlap vertically prev=%p, cur=%p",
+            ALOGE("%s: spans overlap vertically prev=%p, cur=%p",
                     name, prev, cur);
             result = false;
         }
@@ -355,7 +355,7 @@
     }
     if (b != reg.getBounds()) {
         result = false;
-        LOGE("%s: invalid bounds [%d,%d,%d,%d] vs. [%d,%d,%d,%d]", name,
+        ALOGE("%s: invalid bounds [%d,%d,%d,%d] vs. [%d,%d,%d,%d]", name,
                 b.left, b.top, b.right, b.bottom,
                 reg.getBounds().left, reg.getBounds().top, 
                 reg.getBounds().right, reg.getBounds().bottom);
@@ -480,7 +480,7 @@
         const Rect& rhs, int dx, int dy)
 {
     if (!rhs.isValid()) {
-        LOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
+        ALOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
                 op, rhs.left, rhs.top, rhs.right, rhs.bottom);
         return;
     }
diff --git a/libs/ui/VirtualKeyMap.cpp b/libs/ui/VirtualKeyMap.cpp
index 90c092d..62d5b59 100644
--- a/libs/ui/VirtualKeyMap.cpp
+++ b/libs/ui/VirtualKeyMap.cpp
@@ -51,11 +51,11 @@
     Tokenizer* tokenizer;
     status_t status = Tokenizer::open(filename, &tokenizer);
     if (status) {
-        LOGE("Error %d opening virtual key map file %s.", status, filename.string());
+        ALOGE("Error %d opening virtual key map file %s.", status, filename.string());
     } else {
         VirtualKeyMap* map = new VirtualKeyMap();
         if (!map) {
-            LOGE("Error allocating virtual key map.");
+            ALOGE("Error allocating virtual key map.");
             status = NO_MEMORY;
         } else {
 #if DEBUG_PARSER_PERFORMANCE
@@ -104,7 +104,7 @@
             do {
                 String8 token = mTokenizer->nextToken(WHITESPACE_OR_FIELD_DELIMITER);
                 if (token != "0x01") {
-                    LOGE("%s: Unknown virtual key type, expected 0x01.",
+                    ALOGE("%s: Unknown virtual key type, expected 0x01.",
                           mTokenizer->getLocation().string());
                     return BAD_VALUE;
                 }
@@ -116,7 +116,7 @@
                         && parseNextIntField(&defn.width)
                         && parseNextIntField(&defn.height);
                 if (!success) {
-                    LOGE("%s: Expected 5 colon-delimited integers in virtual key definition.",
+                    ALOGE("%s: Expected 5 colon-delimited integers in virtual key definition.",
                           mTokenizer->getLocation().string());
                     return BAD_VALUE;
                 }
@@ -130,7 +130,7 @@
             } while (consumeFieldDelimiterAndSkipWhitespace());
 
             if (!mTokenizer->isEol()) {
-                LOGE("%s: Expected end of line, got '%s'.",
+                ALOGE("%s: Expected end of line, got '%s'.",
                         mTokenizer->getLocation().string(),
                         mTokenizer->peekRemainderOfLine().string());
                 return BAD_VALUE;
@@ -162,7 +162,7 @@
     char* end;
     *outValue = strtol(token.string(), &end, 0);
     if (token.isEmpty() || *end != '\0') {
-        LOGE("Expected an integer, got '%s'.", token.string());
+        ALOGE("Expected an integer, got '%s'.", token.string());
         return false;
     }
     return true;