diff options
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 2283437..06fc708 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; } @@ -102,7 +102,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); } } @@ -138,13 +138,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; } @@ -182,7 +182,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; } @@ -253,7 +253,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; } @@ -288,7 +288,7 @@ MediaPlayer* CameraService::newMediaPlayer(const char *file) { 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 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; @@ -419,7 +419,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; @@ -526,7 +526,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; } @@ -624,7 +624,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(); @@ -676,7 +676,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; } @@ -770,7 +770,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; } @@ -831,7 +831,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; } } @@ -926,12 +926,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; } @@ -989,7 +989,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; } @@ -1022,7 +1022,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; } @@ -1177,7 +1177,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; } @@ -1187,7 +1187,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; } @@ -1213,7 +1213,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; } |