Skip to content

Commit

Permalink
Fix merge failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Diolor committed Jan 8, 2018
1 parent 6781e34 commit cf22a9a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ internal open class CameraDevice(
/**
* Sets the point where the focus & exposure metering will happen.
*/
open fun setFocalPoint(focalRequest: FocalRequest) {
open suspend fun setFocalPoint(focalRequest: FocalRequest) {
logger.recordMethod()

if (capabilities.canSetFocusingAreas()) {
if (capabilities.await().canSetFocusingAreas()) {
camera.updateFocusingAreas(focalRequest)
}
}
Expand Down Expand Up @@ -313,14 +313,14 @@ internal open class CameraDevice(
return FocusResult.Focused
}

private fun Camera.updateFocusingAreas(focalRequest: FocalRequest) {
private suspend fun Camera.updateFocusingAreas(focalRequest: FocalRequest) {
val focusingAreas = focalRequest.toFocusAreas(
displayOrientationDegrees = displayRotation,
cameraIsMirrored = characteristics.isMirrored
)

parameters = parameters.apply {
with(capabilities) {
with(capabilities.await()) {
if (maxMeteringAreas > 0) {
meteringAreas = focusingAreas
}
Expand Down

0 comments on commit cf22a9a

Please sign in to comment.