diff options
author | Steve Block <steveblock@google.com> | 2012-01-06 19:20:56 +0000 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2012-01-19 14:45:03 -0800 |
commit | c6aacce37191e1cc79cfeba13b39899f59c68c3b (patch) | |
tree | df4401aaa38914e03d5eadc82507e7c6fdcc573e /services/camera/libcameraservice/CameraService.cpp | |
parent | a51f0e707f1f3142358aa919ea60ad2842803139 (diff) | |
download | frameworks_base-c6aacce37191e1cc79cfeba13b39899f59c68c3b.zip frameworks_base-c6aacce37191e1cc79cfeba13b39899f59c68c3b.tar.gz frameworks_base-c6aacce37191e1cc79cfeba13b39899f59c68c3b.tar.bz2 |
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
Diffstat (limited to 'services/camera/libcameraservice/CameraService.cpp')
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 3e64db0..6333bd8 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -83,13 +83,13 @@ void CameraService::onFirstRef() 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; } @@ -112,7 +112,7 @@ void CameraService::onFirstRef() 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); } } @@ -148,13 +148,13 @@ sp<ICamera> CameraService::connect( 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; } @@ -192,7 +192,7 @@ sp<ICamera> CameraService::connect( 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; } @@ -263,7 +263,7 @@ status_t CameraService::onTransact( 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; } @@ -298,7 +298,7 @@ MediaPlayer* CameraService::newMediaPlayer(const char *file) { mp->setAudioStreamType(mAudioStreamType); mp->prepare(); } else { - LOGE("Failed to load CameraService sounds: %s", file); + ALOGE("Failed to load CameraService sounds: %s", file); return NULL; } return mp; @@ -399,7 +399,7 @@ status_t CameraService::Client::checkPidAndHardware() const { 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; @@ -429,7 +429,7 @@ status_t CameraService::Client::unlock() { 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; @@ -536,7 +536,7 @@ status_t CameraService::Client::setPreviewWindow(const sp<IBinder>& binder, 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; } @@ -634,7 +634,7 @@ status_t CameraService::Client::startCameraMode(camera_mode mode) { 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(); @@ -686,7 +686,7 @@ status_t CameraService::Client::startRecordingMode() { 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; } @@ -780,7 +780,7 @@ status_t CameraService::Client::takePicture(int msgType) { 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; } @@ -841,7 +841,7 @@ status_t CameraService::Client::enableShutterSound(bool enable) { // 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; } } @@ -936,12 +936,12 @@ sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user) // 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; } @@ -999,7 +999,7 @@ void CameraService::Client::dataCallback(int32_t msgType, 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; } @@ -1032,7 +1032,7 @@ void CameraService::Client::dataCallbackTimestamp(nsecs_t timestamp, 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; } @@ -1187,7 +1187,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame( 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; } @@ -1197,7 +1197,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame( 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; } @@ -1223,7 +1223,7 @@ int CameraService::Client::getOrientation(int degrees, bool mirror) { return HAL_TRANSFORM_FLIP_V | HAL_TRANSFORM_ROT_90; } } - LOGE("Invalid setDisplayOrientation degrees=%d", degrees); + ALOGE("Invalid setDisplayOrientation degrees=%d", degrees); return -1; } |