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/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h
index 44b9de8..34087b5 100644
--- a/services/camera/libcameraservice/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/CameraHardwareInterface.h
@@ -92,7 +92,7 @@
         if(mDevice) {
             int rc = mDevice->common.close(&mDevice->common);
             if (rc != OK)
-                LOGE("Could not close camera %s: %d", mName.string(), rc);
+                ALOGE("Could not close camera %s: %d", mName.string(), rc);
         }
     }
 
@@ -102,7 +102,7 @@
         int rc = module->methods->open(module, mName.string(),
                                        (hw_device_t **)&mDevice);
         if (rc != OK) {
-            LOGE("Could not open camera %s: %d", mName.string(), rc);
+            ALOGE("Could not open camera %s: %d", mName.string(), rc);
             return rc;
         }
         initHalPreviewWindow();
@@ -460,7 +460,7 @@
                 static_cast<CameraHardwareInterface *>(user);
         sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory *>(data->handle));
         if (index >= mem->mNumBufs) {
-            LOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
+            ALOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
                  index, mem->mNumBufs);
             return;
         }
@@ -479,7 +479,7 @@
         // MemoryHeapBase.
         sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory *>(data->handle));
         if (index >= mem->mNumBufs) {
-            LOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
+            ALOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__,
                  index, mem->mNumBufs);
             return;
         }
diff --git a/services/camera/libcameraservice/CameraHardwareStub.cpp b/services/camera/libcameraservice/CameraHardwareStub.cpp
index f922630..cdfb2f5 100644
--- a/services/camera/libcameraservice/CameraHardwareStub.cpp
+++ b/services/camera/libcameraservice/CameraHardwareStub.cpp
@@ -57,7 +57,7 @@
     p.setPictureFormat(CameraParameters::PIXEL_FORMAT_JPEG);
 
     if (setParameters(p) != NO_ERROR) {
-        LOGE("Failed to set default parameters?!");
+        ALOGE("Failed to set default parameters?!");
     }
 }
 
@@ -340,20 +340,20 @@
 
     if (strcmp(params.getPreviewFormat(),
         CameraParameters::PIXEL_FORMAT_YUV420SP) != 0) {
-        LOGE("Only yuv420sp preview is supported");
+        ALOGE("Only yuv420sp preview is supported");
         return -1;
     }
 
     if (strcmp(params.getPictureFormat(),
         CameraParameters::PIXEL_FORMAT_JPEG) != 0) {
-        LOGE("Only jpeg still pictures are supported");
+        ALOGE("Only jpeg still pictures are supported");
         return -1;
     }
 
     int w, h;
     params.getPictureSize(&w, &h);
     if (w != kCannedJpegWidth && h != kCannedJpegHeight) {
-        LOGE("Still picture size must be size of canned JPEG (%dx%d)",
+        ALOGE("Still picture size must be size of canned JPEG (%dx%d)",
              kCannedJpegWidth, kCannedJpegHeight);
         return -1;
     }
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 2283437..06fc708 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -83,13 +83,13 @@
 
     if (hw_get_module(CAMERA_HARDWARE_MODULE_ID,
                 (const hw_module_t **)&mModule) < 0) {
-        LOGE("Could not load camera HAL module");
+        ALOGE("Could not load camera HAL module");
         mNumberOfCameras = 0;
     }
     else {
         mNumberOfCameras = mModule->get_number_of_cameras();
         if (mNumberOfCameras > MAX_CAMERAS) {
-            LOGE("Number of cameras(%d) > MAX_CAMERAS(%d).",
+            ALOGE("Number of cameras(%d) > MAX_CAMERAS(%d).",
                     mNumberOfCameras, MAX_CAMERAS);
             mNumberOfCameras = MAX_CAMERAS;
         }
@@ -102,7 +102,7 @@
 CameraService::~CameraService() {
     for (int i = 0; i < mNumberOfCameras; i++) {
         if (mBusy[i]) {
-            LOGE("camera %d is still in use in destructor!", i);
+            ALOGE("camera %d is still in use in destructor!", i);
         }
     }
 
@@ -138,13 +138,13 @@
     LOG1("CameraService::connect E (pid %d, id %d)", callingPid, cameraId);
 
     if (!mModule) {
-        LOGE("Camera HAL module not loaded");
+        ALOGE("Camera HAL module not loaded");
         return NULL;
     }
 
     sp<Client> client;
     if (cameraId < 0 || cameraId >= mNumberOfCameras) {
-        LOGE("CameraService::connect X (pid %d) rejected (invalid cameraId %d).",
+        ALOGE("CameraService::connect X (pid %d) rejected (invalid cameraId %d).",
             callingPid, cameraId);
         return NULL;
     }
@@ -182,7 +182,7 @@
 
     struct camera_info info;
     if (mModule->get_camera_info(cameraId, &info) != OK) {
-        LOGE("Invalid camera id %d", cameraId);
+        ALOGE("Invalid camera id %d", cameraId);
         return NULL;
     }
 
@@ -253,7 +253,7 @@
                 if (!checkCallingPermission(
                         String16("android.permission.CAMERA"))) {
                     const int uid = getCallingUid();
-                    LOGE("Permission Denial: "
+                    ALOGE("Permission Denial: "
                          "can't use the camera pid=%d, uid=%d", pid, uid);
                     return PERMISSION_DENIED;
                 }
@@ -288,7 +288,7 @@
         mp->setAudioStreamType(AUDIO_STREAM_ENFORCED_AUDIBLE);
         mp->prepare();
     } else {
-        LOGE("Failed to load CameraService sounds: %s", file);
+        ALOGE("Failed to load CameraService sounds: %s", file);
         return NULL;
     }
     return mp;
@@ -389,7 +389,7 @@
     status_t result = checkPid();
     if (result != NO_ERROR) return result;
     if (mHardware == 0) {
-        LOGE("attempt to use a camera after disconnect() (pid %d)", getCallingPid());
+        ALOGE("attempt to use a camera after disconnect() (pid %d)", getCallingPid());
         return INVALID_OPERATION;
     }
     return NO_ERROR;
@@ -419,7 +419,7 @@
     status_t result = checkPid();
     if (result == NO_ERROR) {
         if (mHardware->recordingEnabled()) {
-            LOGE("Not allowed to unlock camera during recording.");
+            ALOGE("Not allowed to unlock camera during recording.");
             return INVALID_OPERATION;
         }
         mClientPid = 0;
@@ -526,7 +526,7 @@
     if (window != 0) {
         result = native_window_api_connect(window.get(), NATIVE_WINDOW_API_CAMERA);
         if (result != NO_ERROR) {
-            LOGE("native_window_api_connect failed: %s (%d)", strerror(-result),
+            ALOGE("native_window_api_connect failed: %s (%d)", strerror(-result),
                     result);
             return result;
         }
@@ -624,7 +624,7 @@
             return startPreviewMode();
         case CAMERA_RECORDING_MODE:
             if (mSurface == 0 && mPreviewWindow == 0) {
-                LOGE("mSurface or mPreviewWindow must be set before startRecordingMode.");
+                ALOGE("mSurface or mPreviewWindow must be set before startRecordingMode.");
                 return INVALID_OPERATION;
             }
             return startRecordingMode();
@@ -676,7 +676,7 @@
     mCameraService->playSound(SOUND_RECORDING);
     result = mHardware->startRecording();
     if (result != NO_ERROR) {
-        LOGE("mHardware->startRecording() failed with status %d", result);
+        ALOGE("mHardware->startRecording() failed with status %d", result);
     }
     return result;
 }
@@ -770,7 +770,7 @@
 
     if ((msgType & CAMERA_MSG_RAW_IMAGE) &&
         (msgType & CAMERA_MSG_RAW_IMAGE_NOTIFY)) {
-        LOGE("CAMERA_MSG_RAW_IMAGE and CAMERA_MSG_RAW_IMAGE_NOTIFY"
+        ALOGE("CAMERA_MSG_RAW_IMAGE and CAMERA_MSG_RAW_IMAGE_NOTIFY"
                 " cannot be both enabled");
         return BAD_VALUE;
     }
@@ -831,7 +831,7 @@
         // Disabling shutter sound is not allowed. Deny if the current
         // process is not mediaserver.
         if (getCallingPid() != getpid()) {
-            LOGE("Failed to disable shutter sound. Permission denied (pid %d)", getCallingPid());
+            ALOGE("Failed to disable shutter sound. Permission denied (pid %d)", getCallingPid());
             return PERMISSION_DENIED;
         }
     }
@@ -926,12 +926,12 @@
 
     // The checks below are not necessary and are for debugging only.
     if (client->mCameraService.get() != gCameraService) {
-        LOGE("mismatch service!");
+        ALOGE("mismatch service!");
         return NULL;
     }
 
     if (client->mHardware == 0) {
-        LOGE("mHardware == 0: callback after disconnect()?");
+        ALOGE("mHardware == 0: callback after disconnect()?");
         return NULL;
     }
 
@@ -989,7 +989,7 @@
     if (!client->lockIfMessageWanted(msgType)) return;
 
     if (dataPtr == 0 && metadata == NULL) {
-        LOGE("Null data returned in data callback");
+        ALOGE("Null data returned in data callback");
         client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
         return;
     }
@@ -1022,7 +1022,7 @@
     if (!client->lockIfMessageWanted(msgType)) return;
 
     if (dataPtr == 0) {
-        LOGE("Null data returned in data with timestamp callback");
+        ALOGE("Null data returned in data with timestamp callback");
         client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
         return;
     }
@@ -1177,7 +1177,7 @@
         mPreviewBuffer = new MemoryHeapBase(size, 0, NULL);
     }
     if (mPreviewBuffer == 0) {
-        LOGE("failed to allocate space for preview buffer");
+        ALOGE("failed to allocate space for preview buffer");
         mLock.unlock();
         return;
     }
@@ -1187,7 +1187,7 @@
 
     sp<MemoryBase> frame = new MemoryBase(previewBuffer, 0, size);
     if (frame == 0) {
-        LOGE("failed to allocate space for frame callback");
+        ALOGE("failed to allocate space for frame callback");
         mLock.unlock();
         return;
     }
@@ -1213,7 +1213,7 @@
             return HAL_TRANSFORM_FLIP_V | HAL_TRANSFORM_ROT_90;
         }
     }
-    LOGE("Invalid setDisplayOrientation degrees=%d", degrees);
+    ALOGE("Invalid setDisplayOrientation degrees=%d", degrees);
     return -1;
 }
 
diff --git a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
index 69f60ca..1055538 100644
--- a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
+++ b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp
@@ -217,7 +217,7 @@
 
 void MCameraClient::assertTest(OP op, int v1, int v2) {
     if (!test(op, v1, v2)) {
-        LOGE("assertTest failed: op=%d, v1=%d, v2=%d", op, v1, v2);
+        ALOGE("assertTest failed: op=%d, v1=%d, v2=%d", op, v1, v2);
         ASSERT(0);
     }
 }