From 92e06bdc4754eae5b28db1cbc41af1a99e14871b Mon Sep 17 00:00:00 2001 From: Michael Bernier Date: Tue, 21 Feb 2017 16:25:33 -0500 Subject: [PATCH] Fix issue #10 properly * Also update build tools to 25.0.2 --- build.gradle | 2 +- .../internal/controller/impl/Camera1Controller.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index ef2780d..f0ca3bc 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ allprojects { ext { sdk = 25 - buildTools = "24.0.3" + buildTools = "25.0.2" minSdk = 10 libraryVersion = "1.0.3" supportVersion = "25.1.0" diff --git a/camerafragment/src/main/java/com/github/florent37/camerafragment/internal/controller/impl/Camera1Controller.java b/camerafragment/src/main/java/com/github/florent37/camerafragment/internal/controller/impl/Camera1Controller.java index 6d0b5fb..4ac6ce8 100644 --- a/camerafragment/src/main/java/com/github/florent37/camerafragment/internal/controller/impl/Camera1Controller.java +++ b/camerafragment/src/main/java/com/github/florent37/camerafragment/internal/controller/impl/Camera1Controller.java @@ -113,7 +113,7 @@ public class Camera1Controller implements CameraController, final Integer frontCameraId = cameraManager.getFaceFrontCameraId(); final Integer currentCameraId = cameraManager.getCurrentCameraId(); - if (cameraFace == Configuration.CAMERA_FACE_REAR && backCameraId != null && !backCameraId.equals(currentCameraId)) { + if (cameraFace == Configuration.CAMERA_FACE_REAR && backCameraId != null) { setCurrentCameraId(backCameraId); cameraManager.closeCamera(this); } else if (frontCameraId != null && !frontCameraId.equals(currentCameraId)) {