Skip to content

Commit

Permalink
Merge pull request #81 from getbouncer/awushensky/fix_crash_on_flash_…
Browse files Browse the repository at this point in the history
…not_supported

Fix crash on flash not supported
  • Loading branch information
awushensky authored Jan 8, 2020
2 parents 9f9e25e + d6cb4fa commit 61d83b5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ We publish our library in the jcenter repository, so for most gradle configurati

```gradle
dependencies {
implementation 'com.getbouncer:cardscan-base:1.0.5121'
implementation 'com.getbouncer:cardscan:1.0.5121'
implementation 'com.getbouncer:cardscan-base:1.0.5122'
implementation 'com.getbouncer:cardscan:1.0.5122'
}
```

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 19
targetSdkVersion 28
versionCode 4015
versionName "1.0.5121"
versionName "1.0.5122"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ public void onPreviewFrame(byte[] bytes, Camera camera) {
public void onClick(View view) {
if (mCamera != null && mFlashlightId == view.getId()) {
Camera.Parameters parameters = mCamera.getParameters();
if (parameters.getFlashMode().equals(Camera.Parameters.FLASH_MODE_TORCH)) {
if (Camera.Parameters.FLASH_MODE_TORCH.equals(parameters.getFlashMode())) {
parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
} else {
parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
version=1.0.5121
version=1.0.5122

0 comments on commit 61d83b5

Please sign in to comment.