Lines Matching refs:res
80 status_t res = OK; in setTorchMode() local
98 res = createFlashlightControl(cameraId); in setTorchMode()
99 if (res) { in setTorchMode()
100 return res; in setTorchMode()
102 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
103 return res; in setTorchMode()
108 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
109 if (res == BAD_INDEX) { in setTorchMode()
113 res = createFlashlightControl(cameraId); in setTorchMode()
114 if (res) { in setTorchMode()
115 return res; in setTorchMode()
117 res = mFlashControl->setTorchMode(cameraId, enabled); in setTorchMode()
120 return res; in setTorchMode()
125 status_t res; in findFlashUnits() local
145 res = createFlashlightControl(id); in findFlashUnits()
146 if (res) { in findFlashUnits()
150 res = mFlashControl->hasFlashUnit(id, &hasFlash); in findFlashUnits()
151 if (res == -EUSERS || res == -EBUSY) { in findFlashUnits()
155 return res; in findFlashUnits()
156 } else if (res) { in findFlashUnits()
158 " (%d)", __FUNCTION__, id.string(), strerror(-res), in findFlashUnits()
159 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()
375 res = startPreviewAndTorch(); in setTorchMode()
376 if (res) { in setTorchMode()
377 return res; in setTorchMode()
400 status_t res; in hasFlashUnitLocked() local
403 res = connectCameraDevice(cameraId); in hasFlashUnitLocked()
404 if (res) { in hasFlashUnitLocked()
405 return res; in hasFlashUnitLocked()
425 res = disconnectCameraDevice(); in hasFlashUnitLocked()
426 if (res != OK) { in hasFlashUnitLocked()
428 strerror(-res), res); in hasFlashUnitLocked()
429 return res; in hasFlashUnitLocked()
437 status_t res = OK; in startPreviewAndTorch() local
438 res = mDevice->startPreview(); in startPreviewAndTorch()
439 if (res) { in startPreviewAndTorch()
441 strerror(-res), res); in startPreviewAndTorch()
442 return res; in startPreviewAndTorch()
482 status_t res; in initializePreviewWindow() local
492 res = mSurfaceTexture->setDefaultBufferSize(width, height); in initializePreviewWindow()
493 if (res) { in initializePreviewWindow()
494 return res; in initializePreviewWindow()
496 res = mSurfaceTexture->setDefaultBufferFormat(format); in initializePreviewWindow()
497 if (res) { in initializePreviewWindow()
498 return res; in initializePreviewWindow()
506 res = native_window_api_connect(mSurface.get(), NATIVE_WINDOW_API_CAMERA); in initializePreviewWindow()
507 if (res) { in initializePreviewWindow()
509 return res; in initializePreviewWindow()
520 status_t res = device->initialize(mProviderManager); in connectCameraDevice() local
521 if (res) { in connectCameraDevice()
524 return res; in connectCameraDevice()
533 res = getSmallestSurfaceSize(&width, &height); in connectCameraDevice()
534 if (res) { in connectCameraDevice()
537 return res; in connectCameraDevice()
540 res = initializePreviewWindow(device, width, height); in connectCameraDevice()
541 if (res) { in connectCameraDevice()
544 return res; in connectCameraDevice()
565 status_t res = native_window_api_disconnect(mSurface.get(), in disconnectCameraDevice() local
567 if (res) { in disconnectCameraDevice()
569 __FUNCTION__, strerror(-res), res); in disconnectCameraDevice()