Fix issue #10 properly

* Also update build tools to 25.0.2
pull/17/head
Michael Bernier 8 years ago
parent 2caa1024d9
commit 92e06bdc47
  1. 2
      build.gradle
  2. 2
      camerafragment/src/main/java/com/github/florent37/camerafragment/internal/controller/impl/Camera1Controller.java

@ -20,7 +20,7 @@ allprojects {
ext { ext {
sdk = 25 sdk = 25
buildTools = "24.0.3" buildTools = "25.0.2"
minSdk = 10 minSdk = 10
libraryVersion = "1.0.3" libraryVersion = "1.0.3"
supportVersion = "25.1.0" supportVersion = "25.1.0"

@ -113,7 +113,7 @@ public class Camera1Controller implements CameraController<Integer>,
final Integer frontCameraId = cameraManager.getFaceFrontCameraId(); final Integer frontCameraId = cameraManager.getFaceFrontCameraId();
final Integer currentCameraId = cameraManager.getCurrentCameraId(); 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); setCurrentCameraId(backCameraId);
cameraManager.closeCamera(this); cameraManager.closeCamera(this);
} else if (frontCameraId != null && !frontCameraId.equals(currentCameraId)) { } else if (frontCameraId != null && !frontCameraId.equals(currentCameraId)) {

Loading…
Cancel
Save