Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0.23'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Maziec committed Apr 17, 2019
2 parents 3ede7de + 023560f commit a22bf7a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'

testImplementation 'junit:junit:4.12'

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
classpath 'com.android.tools.build:gradle:3.4.0-rc03'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Oct 27 00:18:43 CEST 2018
#Thu Jan 31 11:20:46 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
8 changes: 4 additions & 4 deletions scanner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 22
versionName "1.0.22"
versionCode 23
versionName "1.0.23"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand All @@ -28,8 +28,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.media:media:1.1.0-alpha01'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
implementation 'androidx.media:media:1.1.0-alpha04'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

testImplementation 'junit:junit:4.12'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,19 @@ internal class BarcodeScanner(
emitter.onError(NullPointerException("Context is null"))
} else if (!barcodeDetector.isOperational) {
emitter.onError(DetectorNotReadyException())
} else {
} else if (!emitter.isDisposed) {
camera.init(barcodeDetector).getCameraSource()?.start(holder)
camera.setParametersFromConfig()

val tracker = BarcodeTracker(emitter)
val processor = MultiProcessor.Builder(BarcodeTrackerFactory(tracker)).build()
barcodeDetector.setProcessor(processor)

updateDisposable = updateSubject.subscribe({ camera.setParametersFromConfig() }, {})
updateDisposable = updateSubject.subscribe({
if (!emitter.isDisposed) {
camera.setParametersFromConfig()
}
}, {})

emitter.setCancellable {
processor.release()
Expand Down

0 comments on commit a22bf7a

Please sign in to comment.