pull/19/head v1.0.4
florent champigny 8 years ago
parent 1d5a2ba78a
commit 30914b09a9
  1. 2
      README.md
  2. 2
      build.gradle
  3. 4
      camerafragment/src/main/java/com/github/florent37/camerafragment/internal/controller/impl/Camera2Controller.java

@ -136,7 +136,7 @@ CameraFragment comes with some default views
In your module [![Download](https://api.bintray.com/packages/florent37/maven/CameraFragment/images/download.svg)](https://bintray.com/florent37/maven/CameraFragment/_latestVersion) In your module [![Download](https://api.bintray.com/packages/florent37/maven/CameraFragment/images/download.svg)](https://bintray.com/florent37/maven/CameraFragment/_latestVersion)
```groovy ```groovy
compile 'com.github.florent37:camerafragment:1.0.3' compile 'com.github.florent37:camerafragment:1.0.4'
``` ```
#Community #Community

@ -22,6 +22,6 @@ ext {
sdk = 25 sdk = 25
buildTools = "25.0.2" buildTools = "25.0.2"
minSdk = 10 minSdk = 10
libraryVersion = "1.0.3" libraryVersion = "1.0.4"
supportVersion = "25.1.0" supportVersion = "25.1.0"
} }

@ -110,10 +110,10 @@ public class Camera2Controller implements CameraController<String>,
final String faceFrontCameraId = camera2Manager.getFaceFrontCameraId(); final String faceFrontCameraId = camera2Manager.getFaceFrontCameraId();
final String faceBackCameraId = camera2Manager.getFaceBackCameraId(); final String faceBackCameraId = camera2Manager.getFaceBackCameraId();
if (cameraFace == Configuration.CAMERA_FACE_REAR && faceBackCameraId != null && !faceBackCameraId.equals(currentCameraId)) { if (cameraFace == Configuration.CAMERA_FACE_REAR && faceBackCameraId != null) {
setCurrentCameraId(faceBackCameraId); setCurrentCameraId(faceBackCameraId);
camera2Manager.closeCamera(this); camera2Manager.closeCamera(this);
} else if (faceFrontCameraId != null && !faceFrontCameraId.equals(currentCameraId)) { } else if (faceFrontCameraId != null) {
setCurrentCameraId(faceFrontCameraId); setCurrentCameraId(faceFrontCameraId);
camera2Manager.closeCamera(this); camera2Manager.closeCamera(this);
} }

Loading…
Cancel
Save