Lines Matching refs:res

78     status_t res = OK;  in setTorchMode()  local
96 res = createFlashlightControl(cameraId); in setTorchMode()
97 if (res) { in setTorchMode()
98 return res; in setTorchMode()
100 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
101 return res; in setTorchMode()
106 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
107 if (res == BAD_INDEX) { in setTorchMode()
111 res = createFlashlightControl(cameraId); in setTorchMode()
112 if (res) { in setTorchMode()
113 return res; in setTorchMode()
115 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
118 return res; in setTorchMode()
127 status_t res; in findFlashUnits() local
147 res = createFlashlightControl(id); in findFlashUnits()
148 if (res) { in findFlashUnits()
152 res = mFlashControl->hasFlashUnit(id, &hasFlash); in findFlashUnits()
153 if (res == -EUSERS || res == -EBUSY) { in findFlashUnits()
157 return res; in findFlashUnits()
158 } else if (res) { in findFlashUnits()
160 " (%d)", __FUNCTION__, id.string(), strerror(-res), in findFlashUnits()
161 res); in findFlashUnits()
347 status_t res; in setTorchMode() local
351 res = hasFlashUnitLocked(cameraId, &hasFlash, /*keepDeviceOpen*/true); in setTorchMode()
353 if (res) { in setTorchMode()
356 return res == BAD_INDEX ? BAD_INDEX : -EINVAL; in setTorchMode()
376 res = startPreviewAndTorch(); in setTorchMode()
377 if (res) { in setTorchMode()
378 return res; in setTorchMode()
402 status_t res; in hasFlashUnitLocked() local
405 res = connectCameraDevice(cameraId); in hasFlashUnitLocked()
406 if (res) { in hasFlashUnitLocked()
407 return res; in hasFlashUnitLocked()
427 res = disconnectCameraDevice(); in hasFlashUnitLocked()
428 if (res != OK) { in hasFlashUnitLocked()
430 strerror(-res), res); in hasFlashUnitLocked()
431 return res; in hasFlashUnitLocked()
439 status_t res = OK; in startPreviewAndTorch() local
440 res = mDevice->startPreview(); in startPreviewAndTorch()
441 if (res) { in startPreviewAndTorch()
443 strerror(-res), res); in startPreviewAndTorch()
444 return res; in startPreviewAndTorch()
484 status_t res; in initializePreviewWindow() local
494 res = mSurfaceTexture->setDefaultBufferSize(width, height); in initializePreviewWindow()
495 if (res) { in initializePreviewWindow()
496 return res; in initializePreviewWindow()
498 res = mSurfaceTexture->setDefaultBufferFormat(format); in initializePreviewWindow()
499 if (res) { in initializePreviewWindow()
500 return res; in initializePreviewWindow()
508 res = native_window_api_connect(mSurface.get(), NATIVE_WINDOW_API_CAMERA); in initializePreviewWindow()
509 if (res) { in initializePreviewWindow()
511 return res; in initializePreviewWindow()
522 status_t res = device->initialize(mProviderManager); in connectCameraDevice() local
523 if (res) { in connectCameraDevice()
526 return res; in connectCameraDevice()
535 res = getSmallestSurfaceSize(&width, &height); in connectCameraDevice()
536 if (res) { in connectCameraDevice()
539 return res; in connectCameraDevice()
542 res = initializePreviewWindow(device, width, height); in connectCameraDevice()
543 if (res) { in connectCameraDevice()
546 return res; in connectCameraDevice()
567 status_t res = native_window_api_disconnect(mSurface.get(), in disconnectCameraDevice() local
569 if (res) { in disconnectCameraDevice()
571 __FUNCTION__, strerror(-res), res); in disconnectCameraDevice()