Merge pull request #4 from teslamotors/master

Merge Tesla master
This commit is contained in:
Aaron Grider 2021-01-04 12:28:43 -08:00 committed by GitHub
commit 6eac2adede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 28
compileSdkVersion 30
defaultConfig {
minSdkVersion 23
@ -10,7 +10,7 @@ android {
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
abiFilters "arm64-v8a", "x86"
}
}
lintOptions {
@ -25,10 +25,10 @@ dependencies {
implementation "androidx.core:core-ktx:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.camera:camera-core:1.0.0-beta08"
implementation "androidx.camera:camera-camera2:1.0.0-beta08"
implementation "androidx.camera:camera-lifecycle:1.0.0-beta08"
implementation "androidx.camera:camera-view:1.0.0-alpha15"
implementation "androidx.camera:camera-core:1.0.0-rc01"
implementation "androidx.camera:camera-camera2:1.0.0-rc01"
implementation "androidx.camera:camera-lifecycle:1.0.0-rc01"
implementation "androidx.camera:camera-view:1.0.0-alpha20"
implementation 'com.google.mlkit:barcode-scanning:16.0.3'
}

View File

@ -150,7 +150,7 @@ class CKCamera(context: ThemedReactContext) : FrameLayout(context), LifecycleObs
cameraSelector = CameraSelector.Builder().requireLensFacing(lensType).build()
preview = Preview.Builder().build().also {
it.setSurfaceProvider(viewFinder.createSurfaceProvider())
it.setSurfaceProvider(viewFinder.surfaceProvider)
}
imageCapture = ImageCapture.Builder().build()
@ -212,7 +212,7 @@ class CKCamera(context: ThemedReactContext) : FrameLayout(context), LifecycleObs
cameraSelector,
*useCases.toTypedArray()
)
preview!!.setSurfaceProvider(viewFinder.createSurfaceProvider())
preview!!.setSurfaceProvider(viewFinder.surfaceProvider)
Log.d(TAG, "CameraView: Use cases bound")
} catch (exc: Exception) {
Log.e(TAG, "CameraView: Use cases binding failed", exc)