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/driver/rsdAllocation.cpp b/driver/rsdAllocation.cpp
index e79cd0f..1f70e66 100644
--- a/driver/rsdAllocation.cpp
+++ b/driver/rsdAllocation.cpp
@@ -172,7 +172,7 @@
 
         if (!drv->renderTargetID) {
             // This should generally not happen
-            LOGE("allocateRenderTarget failed to gen mRenderTargetID");
+            ALOGE("allocateRenderTarget failed to gen mRenderTargetID");
             rsc->dumpDebug();
             return;
         }
@@ -195,7 +195,7 @@
         RSD_CALL_GL(glGenBuffers, 1, &drv->bufferID);
     }
     if (!drv->bufferID) {
-        LOGE("Upload to buffer object failed");
+        ALOGE("Upload to buffer object failed");
         drv->uploadDeferred = true;
         return;
     }
@@ -460,7 +460,7 @@
         uint8_t *srcPtr = getOffsetPtr(srcAlloc, srcXoff, srcYoff + i, srcLod, srcFace);
         memcpy(dstPtr, srcPtr, w * elementSize);
 
-        //LOGE("COPIED dstXoff(%u), dstYoff(%u), dstLod(%u), dstFace(%u), w(%u), h(%u), srcXoff(%u), srcYoff(%u), srcLod(%u), srcFace(%u)",
+        //ALOGE("COPIED dstXoff(%u), dstYoff(%u), dstLod(%u), dstFace(%u), w(%u), h(%u), srcXoff(%u), srcYoff(%u), srcLod(%u), srcFace(%u)",
         //     dstXoff, dstYoff, dstLod, dstFace, w, h, srcXoff, srcYoff, srcLod, srcFace);
     }
 }
diff --git a/driver/rsdBcc.cpp b/driver/rsdBcc.cpp
index 917b419..24bb288 100644
--- a/driver/rsdBcc.cpp
+++ b/driver/rsdBcc.cpp
@@ -69,7 +69,7 @@
                      uint8_t const *bitcode,
                      size_t bitcodeSize,
                      uint32_t flags) {
-    //LOGE("rsdScriptCreate %p %p %p %p %i %i %p", rsc, resName, cacheDir, bitcode, bitcodeSize, flags, lookupFunc);
+    //ALOGE("rsdScriptCreate %p %p %p %p %i %i %p", rsc, resName, cacheDir, bitcode, bitcodeSize, flags, lookupFunc);
 
     pthread_mutex_lock(&rsdgInitMutex);
 
@@ -93,14 +93,14 @@
     drv->ME = new bcinfo::MetadataExtractor((const char*)drv->mScriptText,
                                             drv->mScriptTextLength);
     if (!drv->ME->extract()) {
-      LOGE("bcinfo: failed to read script metadata");
+      ALOGE("bcinfo: failed to read script metadata");
       goto error;
     }
 
-    //LOGE("mBccScript %p", script->mBccScript);
+    //ALOGE("mBccScript %p", script->mBccScript);
 
     if (bccRegisterSymbolCallback(drv->mBccScript, &rsdLookupRuntimeStub, script) != 0) {
-        LOGE("bcc: FAILS to register symbol callback");
+        ALOGE("bcc: FAILS to register symbol callback");
         goto error;
     }
 
@@ -108,17 +108,17 @@
                   resName,
                   (char const *)drv->mScriptText,
                   drv->mScriptTextLength, 0) != 0) {
-        LOGE("bcc: FAILS to read bitcode");
+        ALOGE("bcc: FAILS to read bitcode");
         goto error;
     }
 
     if (bccLinkFile(drv->mBccScript, "/system/lib/libclcore.bc", 0) != 0) {
-        LOGE("bcc: FAILS to link bitcode");
+        ALOGE("bcc: FAILS to link bitcode");
         goto error;
     }
 
     if (bccPrepareExecutable(drv->mBccScript, cacheDir, resName, 0) != 0) {
-        LOGE("bcc: FAILS to prepare executable");
+        ALOGE("bcc: FAILS to prepare executable");
         goto error;
     }
 
@@ -234,8 +234,8 @@
             return;
         }
 
-        //LOGE("usr idx %i, x %i,%i  y %i,%i", idx, mtls->xStart, mtls->xEnd, yStart, yEnd);
-        //LOGE("usr ptr in %p,  out %p", mtls->ptrIn, mtls->ptrOut);
+        //ALOGE("usr idx %i, x %i,%i  y %i,%i", idx, mtls->xStart, mtls->xEnd, yStart, yEnd);
+        //ALOGE("usr ptr in %p,  out %p", mtls->ptrIn, mtls->ptrOut);
         for (p.y = yStart; p.y < yEnd; p.y++) {
             uint32_t offset = mtls->dimX * p.y;
             p.out = mtls->ptrOut + (mtls->eStrideOut * offset);
@@ -265,8 +265,8 @@
             return;
         }
 
-        //LOGE("usr slice %i idx %i, x %i,%i", slice, idx, xStart, xEnd);
-        //LOGE("usr ptr in %p,  out %p", mtls->ptrIn, mtls->ptrOut);
+        //ALOGE("usr slice %i idx %i, x %i,%i", slice, idx, xStart, xEnd);
+        //ALOGE("usr ptr in %p,  out %p", mtls->ptrIn, mtls->ptrOut);
 
         p.out = mtls->ptrOut + (mtls->eStrideOut * xStart);
         p.in = mtls->ptrIn + (mtls->eStrideIn * xStart);
@@ -372,7 +372,7 @@
             rsdLaunchThreads(mrsc, wc_x, &mtls);
         }
 
-        //LOGE("launch 1");
+        //ALOGE("launch 1");
     } else {
         RsForEachStubParamStruct p;
         memset(&p, 0, sizeof(p));
@@ -380,7 +380,7 @@
         p.usr_len = mtls.usrLen;
         uint32_t sig = mtls.sig;
 
-        //LOGE("launch 3");
+        //ALOGE("launch 3");
         outer_foreach_t fn = dc->mForEachLaunch[sig];
         for (p.ar[0] = mtls.arrayStart; p.ar[0] < mtls.arrayEnd; p.ar[0]++) {
             for (p.z = mtls.zStart; p.z < mtls.zEnd; p.z++) {
@@ -432,7 +432,7 @@
                             const void *params,
                             size_t paramLength) {
     DrvScript *drv = (DrvScript *)script->mHal.drv;
-    //LOGE("invoke %p %p %i %p %i", dc, script, slot, params, paramLength);
+    //ALOGE("invoke %p %p %i %p %i", dc, script, slot, params, paramLength);
 
     Script * oldTLS = setTLS(script);
     ((void (*)(const void *, uint32_t))
@@ -444,7 +444,7 @@
                            uint32_t slot, void *data, size_t dataLength) {
     DrvScript *drv = (DrvScript *)script->mHal.drv;
     //rsAssert(!script->mFieldIsObject[slot]);
-    //LOGE("setGlobalVar %p %p %i %p %i", dc, script, slot, data, dataLength);
+    //ALOGE("setGlobalVar %p %p %i %p %i", dc, script, slot, data, dataLength);
 
     int32_t *destPtr = ((int32_t **)drv->mFieldAddress)[slot];
     if (!destPtr) {
@@ -458,7 +458,7 @@
 void rsdScriptSetGlobalBind(const Context *dc, const Script *script, uint32_t slot, void *data) {
     DrvScript *drv = (DrvScript *)script->mHal.drv;
     //rsAssert(!script->mFieldIsObject[slot]);
-    //LOGE("setGlobalBind %p %p %i %p", dc, script, slot, data);
+    //ALOGE("setGlobalBind %p %p %i %p", dc, script, slot, data);
 
     int32_t *destPtr = ((int32_t **)drv->mFieldAddress)[slot];
     if (!destPtr) {
@@ -472,7 +472,7 @@
 void rsdScriptSetGlobalObj(const Context *dc, const Script *script, uint32_t slot, ObjectBase *data) {
     DrvScript *drv = (DrvScript *)script->mHal.drv;
     //rsAssert(script->mFieldIsObject[slot]);
-    //LOGE("setGlobalObj %p %p %i %p", dc, script, slot, data);
+    //ALOGE("setGlobalObj %p %p %i %p", dc, script, slot, data);
 
     int32_t *destPtr = ((int32_t **)drv->mFieldAddress)[slot];
     if (!destPtr) {
diff --git a/driver/rsdCore.cpp b/driver/rsdCore.cpp
index 9292fa1..b514e21 100644
--- a/driver/rsdCore.cpp
+++ b/driver/rsdCore.cpp
@@ -146,7 +146,7 @@
 
     int status = pthread_setspecific(rsdgThreadTLSKey, &dc->mTlsStruct);
     if (status) {
-        LOGE("pthread_setspecific %i", status);
+        ALOGE("pthread_setspecific %i", status);
     }
 
 #if 0
@@ -156,7 +156,7 @@
     cpuset.bits[idx / 64] |= 1ULL << (idx % 64);
     int ret = syscall(241, rsc->mWorkers.mNativeThreadId[idx],
               sizeof(cpuset), &cpuset);
-    LOGE("SETAFFINITY ret = %i %s", ret, EGLUtils::strerror(ret));
+    ALOGE("SETAFFINITY ret = %i %s", ret, EGLUtils::strerror(ret));
 #endif
 
     while (!dc->mExit) {
@@ -191,7 +191,7 @@
 
     RsdHal *dc = (RsdHal *)calloc(1, sizeof(RsdHal));
     if (!dc) {
-        LOGE("Calloc for driver hal failed.");
+        ALOGE("Calloc for driver hal failed.");
         return false;
     }
     rsc->mHal.drv = dc;
@@ -200,7 +200,7 @@
     if (!rsdgThreadTLSKeyCount) {
         int status = pthread_key_create(&rsdgThreadTLSKey, NULL);
         if (status) {
-            LOGE("Failed to init thread tls key.");
+            ALOGE("Failed to init thread tls key.");
             pthread_mutex_unlock(&rsdgInitMutex);
             return false;
         }
@@ -214,7 +214,7 @@
     dc->mTlsStruct.mScript = NULL;
     int status = pthread_setspecific(rsdgThreadTLSKey, &dc->mTlsStruct);
     if (status) {
-        LOGE("pthread_setspecific %i", status);
+        ALOGE("pthread_setspecific %i", status);
     }
 
 
@@ -236,7 +236,7 @@
     pthread_attr_t threadAttr;
     status = pthread_attr_init(&threadAttr);
     if (status) {
-        LOGE("Failed to init thread attribute.");
+        ALOGE("Failed to init thread attribute.");
         return false;
     }
 
@@ -244,7 +244,7 @@
         status = pthread_create(&dc->mWorkers.mThreadId[ct], &threadAttr, HelperThreadProc, rsc);
         if (status) {
             dc->mWorkers.mCount = ct;
-            LOGE("Created fewer than expected number of RS threads.");
+            ALOGE("Created fewer than expected number of RS threads.");
             break;
         }
     }
diff --git a/driver/rsdGL.cpp b/driver/rsdGL.cpp
index d4deefb..b53a68c 100644
--- a/driver/rsdGL.cpp
+++ b/driver/rsdGL.cpp
@@ -107,14 +107,14 @@
 }
 
 static void DumpDebug(RsdHal *dc) {
-    LOGE(" EGL ver %i %i", dc->gl.egl.majorVersion, dc->gl.egl.minorVersion);
-    LOGE(" EGL context %p  surface %p,  Display=%p", dc->gl.egl.context, dc->gl.egl.surface,
+    ALOGE(" EGL ver %i %i", dc->gl.egl.majorVersion, dc->gl.egl.minorVersion);
+    ALOGE(" EGL context %p  surface %p,  Display=%p", dc->gl.egl.context, dc->gl.egl.surface,
          dc->gl.egl.display);
-    LOGE(" GL vendor: %s", dc->gl.gl.vendor);
-    LOGE(" GL renderer: %s", dc->gl.gl.renderer);
-    LOGE(" GL Version: %s", dc->gl.gl.version);
-    LOGE(" GL Extensions: %s", dc->gl.gl.extensions);
-    LOGE(" GL int Versions %i %i", dc->gl.gl.majorVersion, dc->gl.gl.minorVersion);
+    ALOGE(" GL vendor: %s", dc->gl.gl.vendor);
+    ALOGE(" GL renderer: %s", dc->gl.gl.renderer);
+    ALOGE(" GL Version: %s", dc->gl.gl.version);
+    ALOGE(" GL Extensions: %s", dc->gl.gl.extensions);
+    ALOGE(" GL int Versions %i %i", dc->gl.gl.majorVersion, dc->gl.gl.minorVersion);
 
     ALOGV("MAX Textures %i, %i  %i", dc->gl.gl.maxVertexTextureUnits,
          dc->gl.gl.maxFragmentTextureImageUnits, dc->gl.gl.maxTextureImageUnits);
@@ -223,7 +223,7 @@
                 configAttribs, configs, numConfigs, &n);
         if (!ret || !n) {
             checkEglError("eglChooseConfig", ret);
-            LOGE("%p, couldn't find an EGLConfig matching the screen format\n", rsc);
+            ALOGE("%p, couldn't find an EGLConfig matching the screen format\n", rsc);
         }
 
         // The first config is guaranteed to over-satisfy the constraints
@@ -268,7 +268,7 @@
                                           EGL_NO_CONTEXT, context_attribs2);
     checkEglError("eglCreateContext");
     if (dc->gl.egl.context == EGL_NO_CONTEXT) {
-        LOGE("%p, eglCreateContext returned EGL_NO_CONTEXT", rsc);
+        ALOGE("%p, eglCreateContext returned EGL_NO_CONTEXT", rsc);
         rsc->setWatchdogGL(NULL, 0, NULL);
         return false;
     }
@@ -281,7 +281,7 @@
                                                         pbuffer_attribs);
     checkEglError("eglCreatePbufferSurface");
     if (dc->gl.egl.surfaceDefault == EGL_NO_SURFACE) {
-        LOGE("eglCreatePbufferSurface returned EGL_NO_SURFACE");
+        ALOGE("eglCreatePbufferSurface returned EGL_NO_SURFACE");
         rsdGLShutdown(rsc);
         rsc->setWatchdogGL(NULL, 0, NULL);
         return false;
@@ -291,7 +291,7 @@
     ret = eglMakeCurrent(dc->gl.egl.display, dc->gl.egl.surfaceDefault,
                          dc->gl.egl.surfaceDefault, dc->gl.egl.context);
     if (ret == EGL_FALSE) {
-        LOGE("eglMakeCurrent returned EGL_FALSE");
+        ALOGE("eglMakeCurrent returned EGL_FALSE");
         checkEglError("eglMakeCurrent", ret);
         rsdGLShutdown(rsc);
         rsc->setWatchdogGL(NULL, 0, NULL);
@@ -320,7 +320,7 @@
     }
 
     if (!verptr) {
-        LOGE("Error, OpenGL ES Lite not supported");
+        ALOGE("Error, OpenGL ES Lite not supported");
         rsdGLShutdown(rsc);
         rsc->setWatchdogGL(NULL, 0, NULL);
         return false;
@@ -402,7 +402,7 @@
                                                     dc->gl.wndSurface, NULL);
         checkEglError("eglCreateWindowSurface");
         if (dc->gl.egl.surface == EGL_NO_SURFACE) {
-            LOGE("eglCreateWindowSurface returned EGL_NO_SURFACE");
+            ALOGE("eglCreateWindowSurface returned EGL_NO_SURFACE");
         }
 
         rsc->setWatchdogGL("eglMakeCurrent", __LINE__, __FILE__);
@@ -439,7 +439,7 @@
             }
         }
 
-        LOGE("%p, %s", rsc, buf);
+        ALOGE("%p, %s", rsc, buf);
     }
 
 }
diff --git a/driver/rsdMeshObj.cpp b/driver/rsdMeshObj.cpp
index 24a7183..99d79dc 100644
--- a/driver/rsdMeshObj.cpp
+++ b/driver/rsdMeshObj.cpp
@@ -133,7 +133,7 @@
 void RsdMeshObj::renderPrimitiveRange(const Context *rsc, uint32_t primIndex,
                                       uint32_t start, uint32_t len) const {
     if (len < 1 || primIndex >= mRSMesh->mHal.state.primitivesCount || mAttribCount == 0) {
-        LOGE("Invalid mesh or parameters");
+        ALOGE("Invalid mesh or parameters");
         return;
     }
 
diff --git a/driver/rsdProgramStore.cpp b/driver/rsdProgramStore.cpp
index af44b02..fca9ba9 100644
--- a/driver/rsdProgramStore.cpp
+++ b/driver/rsdProgramStore.cpp
@@ -70,7 +70,7 @@
         drv->depthFunc = GL_NOTEQUAL;
         break;
     default:
-        LOGE("Unknown depth function.");
+        ALOGE("Unknown depth function.");
         goto error;
     }
 
@@ -111,7 +111,7 @@
         drv->blendSrc = GL_SRC_ALPHA_SATURATE;
         break;
     default:
-        LOGE("Unknown blend src mode.");
+        ALOGE("Unknown blend src mode.");
         goto error;
     }
 
@@ -141,7 +141,7 @@
         drv->blendDst = GL_ONE_MINUS_DST_ALPHA;
         break;
     default:
-        LOGE("Unknown blend dst mode.");
+        ALOGE("Unknown blend dst mode.");
         goto error;
     }
 
diff --git a/driver/rsdRuntimeMath.cpp b/driver/rsdRuntimeMath.cpp
index b927ed2..e315539 100644
--- a/driver/rsdRuntimeMath.cpp
+++ b/driver/rsdRuntimeMath.cpp
@@ -122,7 +122,7 @@
 }
 
 static float SC_mix_f32(float start, float stop, float amount) {
-    //LOGE("lerpf %f  %f  %f", start, stop, amount);
+    //ALOGE("lerpf %f  %f  %f", start, stop, amount);
     return start + (stop - start) * amount;
 }
 
diff --git a/driver/rsdRuntimeStubs.cpp b/driver/rsdRuntimeStubs.cpp
index b457d8b..14c2970 100644
--- a/driver/rsdRuntimeStubs.cpp
+++ b/driver/rsdRuntimeStubs.cpp
@@ -686,7 +686,7 @@
         s->mHal.info.isThreadable &= sym->threadable;
         return sym->mPtr;
     }
-    LOGE("ScriptC sym lookup failed for %s", name);
+    ALOGE("ScriptC sym lookup failed for %s", name);
     return NULL;
 }
 
diff --git a/driver/rsdShader.cpp b/driver/rsdShader.cpp
index e9ce7c2..a10deb4 100644
--- a/driver/rsdShader.cpp
+++ b/driver/rsdShader.cpp
@@ -190,7 +190,7 @@
                 char* buf = (char*) malloc(infoLen);
                 if (buf) {
                     RSD_CALL_GL(glGetShaderInfoLog, mShaderID, infoLen, NULL, buf);
-                    LOGE("Could not compile shader \n%s\n", buf);
+                    ALOGE("Could not compile shader \n%s\n", buf);
                     free(buf);
                 }
                 RSD_CALL_GL(glDeleteShader, mShaderID);
@@ -287,9 +287,9 @@
                 rsAssert(0);
             }
         }
-        LOGE("Element size %u data=%p", elementSize, fd);
+        ALOGE("Element size %u data=%p", elementSize, fd);
         fd += elementSize;
-        LOGE("New data=%p", fd);
+        ALOGE("New data=%p", fd);
     }
 }
 
@@ -404,7 +404,7 @@
     uint32_t numTexturesToBind = mRSProgram->mHal.state.texturesCount;
     uint32_t numTexturesAvailable = dc->gl.gl.maxFragmentTextureImageUnits;
     if (numTexturesToBind >= numTexturesAvailable) {
-        LOGE("Attempting to bind %u textures on shader id %u, but only %u are available",
+        ALOGE("Attempting to bind %u textures on shader id %u, but only %u are available",
              mRSProgram->mHal.state.texturesCount, (uint32_t)this, numTexturesAvailable);
         rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind more textuers than available");
         numTexturesToBind = numTexturesAvailable;
@@ -422,7 +422,7 @@
 
         DrvAllocation *drvTex = (DrvAllocation *)mRSProgram->mHal.state.textures[ct]->mHal.drv;
         if (drvTex->glTarget != GL_TEXTURE_2D && drvTex->glTarget != GL_TEXTURE_CUBE_MAP) {
-            LOGE("Attempting to bind unknown texture to shader id %u, texture unit %u", (uint)this, ct);
+            ALOGE("Attempting to bind unknown texture to shader id %u, texture unit %u", (uint)this, ct);
             rsc->setError(RS_ERROR_BAD_SHADER, "Non-texture allocation bound to a shader");
         }
         RSD_CALL_GL(glBindTexture, drvTex->glTarget, drvTex->textureID);
@@ -450,7 +450,7 @@
     for (uint32_t ct=0; ct < mRSProgram->mHal.state.constantsCount; ct++) {
         Allocation *alloc = mRSProgram->mHal.state.constants[ct];
         if (!alloc) {
-            LOGE("Attempting to set constants on shader id %u, but alloc at slot %u is not set",
+            ALOGE("Attempting to set constants on shader id %u, but alloc at slot %u is not set",
                  (uint32_t)this, ct);
             rsc->setError(RS_ERROR_BAD_SHADER, "No constant allocation bound");
             continue;
diff --git a/driver/rsdShaderCache.cpp b/driver/rsdShaderCache.cpp
index 2871a12..f6236e7 100644
--- a/driver/rsdShaderCache.cpp
+++ b/driver/rsdShaderCache.cpp
@@ -135,7 +135,7 @@
     }
 
     //ALOGV("RsdShaderCache miss");
-    //LOGE("e0 %x", glGetError());
+    //ALOGE("e0 %x", glGetError());
     ProgramEntry *e = new ProgramEntry(vtx->getAttribCount(),
                                        vtx->getUniformCount(),
                                        frag->getUniformCount());
@@ -147,7 +147,7 @@
     if (e->program) {
         GLuint pgm = e->program;
         glAttachShader(pgm, vtx->getShaderID());
-        //LOGE("e1 %x", glGetError());
+        //ALOGE("e1 %x", glGetError());
         glAttachShader(pgm, frag->getShaderID());
 
         glBindAttribLocation(pgm, 0, "ATTRIB_position");
@@ -155,9 +155,9 @@
         glBindAttribLocation(pgm, 2, "ATTRIB_normal");
         glBindAttribLocation(pgm, 3, "ATTRIB_texture0");
 
-        //LOGE("e2 %x", glGetError());
+        //ALOGE("e2 %x", glGetError());
         glLinkProgram(pgm);
-        //LOGE("e3 %x", glGetError());
+        //ALOGE("e3 %x", glGetError());
         GLint linkStatus = GL_FALSE;
         glGetProgramiv(pgm, GL_LINK_STATUS, &linkStatus);
         if (linkStatus != GL_TRUE) {
@@ -167,7 +167,7 @@
                 char* buf = (char*) malloc(bufLength);
                 if (buf) {
                     glGetProgramInfoLog(pgm, bufLength, NULL, buf);
-                    LOGE("Could not link program:\n%s\n", buf);
+                    ALOGE("Could not link program:\n%s\n", buf);
                     free(buf);
                 }
             }
@@ -205,7 +205,7 @@
                     glGetActiveUniform(pgm, ct, maxNameLength, &uniformList[ct]->writtenLength,
                                        &uniformList[ct]->arraySize, &uniformList[ct]->type,
                                        uniformList[ct]->name);
-                    //LOGE("GL UNI idx=%u, arraySize=%u, name=%s", ct,
+                    //ALOGE("GL UNI idx=%u, arraySize=%u, name=%s", ct,
                     //     uniformList[ct]->arraySize, uniformList[ct]->name);
                 }
             }