Lines Matching refs:cameraId
52 status_t CameraFlashlight::createFlashlightControl(const String8& cameraId) { in createFlashlightControl() argument
54 cameraId.string()); in createFlashlightControl()
59 if (mProviderManager->supportSetTorchMode(cameraId.string())) { in createFlashlightControl()
70 status_t CameraFlashlight::setTorchMode(const String8& cameraId, bool enabled) { in setTorchMode() argument
78 cameraId.string(), enabled); in setTorchMode()
83 if (mOpenedCameraIds.indexOf(cameraId) != NAME_NOT_FOUND) { in setTorchMode()
93 __FUNCTION__, cameraId.string()); in setTorchMode()
98 res = createFlashlightControl(cameraId); in setTorchMode()
102 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
108 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
113 res = createFlashlightControl(cameraId); in setTorchMode()
117 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
171 bool CameraFlashlight::hasFlashUnit(const String8& cameraId) { in hasFlashUnit() argument
173 return hasFlashUnitLocked(cameraId); in hasFlashUnit()
176 bool CameraFlashlight::hasFlashUnitLocked(const String8& cameraId) { in hasFlashUnitLocked() argument
183 ssize_t index = mHasFlashlightMap.indexOfKey(cameraId); in hasFlashUnitLocked()
187 __FUNCTION__, cameraId.string()); in hasFlashUnitLocked()
194 bool CameraFlashlight::isBackwardCompatibleMode(const String8& cameraId) { in isBackwardCompatibleMode() argument
197 !mProviderManager->supportSetTorchMode(cameraId.string())) { in isBackwardCompatibleMode()
203 status_t CameraFlashlight::prepareDeviceOpen(const String8& cameraId) { in prepareDeviceOpen() argument
213 if (isBackwardCompatibleMode(cameraId)) { in prepareDeviceOpen()
235 if (mOpenedCameraIds.indexOf(cameraId) == NAME_NOT_FOUND) { in prepareDeviceOpen()
236 mOpenedCameraIds.add(cameraId); in prepareDeviceOpen()
242 status_t CameraFlashlight::deviceClosed(const String8& cameraId) { in deviceClosed() argument
243 ALOGV("%s: device %s is closed", __FUNCTION__, cameraId.string()); in deviceClosed()
252 ssize_t index = mOpenedCameraIds.indexOf(cameraId); in deviceClosed()
255 cameraId.string()); in deviceClosed()
264 if (isBackwardCompatibleMode(cameraId)) { in deviceClosed()
296 status_t ProviderFlashControl::hasFlashUnit(const String8& cameraId, bool *hasFlash) { in hasFlashUnit() argument
300 *hasFlash = mProviderManager->hasFlashUnit(cameraId.string()); in hasFlashUnit()
304 status_t ProviderFlashControl::setTorchMode(const String8& cameraId, bool enabled) { in setTorchMode() argument
306 cameraId.string(), enabled); in setTorchMode()
308 return mProviderManager->setTorchMode(cameraId.string(), enabled); in setTorchMode()
343 const String8& cameraId, bool enabled) { in setTorchMode() argument
351 res = hasFlashUnitLocked(cameraId, &hasFlash, /*keepDeviceOpen*/true); in setTorchMode()
364 } else if (mDevice == NULL || cameraId != mCameraId) { in setTorchMode()
371 mCallbacks->onTorchStatusChanged(cameraId, TorchModeStatus::AVAILABLE_OFF); in setTorchMode()
381 mCallbacks->onTorchStatusChanged(cameraId, TorchModeStatus::AVAILABLE_ON); in setTorchMode()
386 const String8& cameraId, bool *hasFlash) { in hasFlashUnit() argument
389 return hasFlashUnitLocked(cameraId, hasFlash, /*keepDeviceOpen*/false); in hasFlashUnit()
393 const String8& cameraId, bool *hasFlash, bool keepDeviceOpen) { in hasFlashUnitLocked() argument
403 res = connectCameraDevice(cameraId); in hasFlashUnitLocked()
412 if (cameraId != mCameraId) { in hasFlashUnitLocked()
516 const String8& cameraId) { in connectCameraDevice() argument
518 new CameraHardwareInterface(cameraId.string()); in connectCameraDevice()
523 cameraId.string()); in connectCameraDevice()
536 __FUNCTION__, cameraId.string()); in connectCameraDevice()
543 __FUNCTION__, cameraId.string()); in connectCameraDevice()
547 mCameraId = cameraId; in connectCameraDevice()