Skip to content

Commit

Permalink
Merge pull request CameraKit#268 from wonderkiln/release/0.12.2
Browse files Browse the repository at this point in the history
Release 0.12.2
  • Loading branch information
Dylan McIntyre authored Dec 4, 2017
2 parents 77a3441 + 7480e95 commit 500ac04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion camerakit/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'

def ver = '0.12.1'
def ver = '0.12.2'

def isSnapshot(version) {
return version.contains('-Snapshot') || System.getenv('CIRCLE_TAG') == null || System.getenv('CIRCLE_TAG').length() == 0
Expand Down
11 changes: 9 additions & 2 deletions camerakit/src/main/api16/com/wonderkiln/camerakit/Camera1.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,15 @@ void setDisplayAndDeviceOrientation(int displayOrientation, int deviceOrientatio
this.mDisplayOrientation = displayOrientation;
this.mDeviceOrientation = deviceOrientation;

if (isCameraOpened()) {
mCamera.setDisplayOrientation(calculatePreviewRotation());
synchronized (mCameraLock) {
if (isCameraOpened()) {
try {
mCamera.setDisplayOrientation(calculatePreviewRotation());
} catch (RuntimeException e) {
// Camera is released. Ignore. Orientations are still valid in local member fields
// so next time camera starts it will have correct configuration.
}
}
}
}

Expand Down

0 comments on commit 500ac04

Please sign in to comment.