Skip to content

Commit

Permalink
* Fix for older devices reporting wrong camera (Android 5.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
thanksmister committed Aug 10, 2018
1 parent 6932d65 commit efa556c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion WallPanelApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repositories {
def versionMajor = 0
def versionMinor = 8
def versionPatch = 3
def versionBuild = 0 // bump for dog food builds, public betas, etc.
def versionBuild = 1 // bump for dog food builds, public betas, etc.

android {
kapt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ constructor(private val context: Context) {
Timber.e(e.message)
try {
if(configuration.cameraId == CAMERA_FACING_FRONT) {
initCamera(CAMERA_FACING_FRONT, configuration.cameraFPS)
} else {
initCamera(CAMERA_FACING_BACK, configuration.cameraFPS)
} else {
initCamera(CAMERA_FACING_FRONT, configuration.cameraFPS)
}
} catch (e : IOException) {
Timber.e(e.message)
Expand All @@ -172,9 +172,9 @@ constructor(private val context: Context) {
override fun onCameraError() {
Timber.e("Camera Preview Error")
cameraSource = if(configuration.cameraId == CAMERA_FACING_FRONT) {
initCameraPreview(CAMERA_FACING_FRONT, configuration.cameraFPS)
} else {
initCameraPreview(CAMERA_FACING_BACK, configuration.cameraFPS)
} else {
initCameraPreview(CAMERA_FACING_FRONT, configuration.cameraFPS)
}
if(cameraPreview != null) {
try {
Expand Down Expand Up @@ -211,9 +211,9 @@ constructor(private val context: Context) {
override fun onCameraError() {
Timber.e("Camera Preview Error")
cameraSource = if(configuration.cameraId == CAMERA_FACING_FRONT) {
initCameraPreview(CAMERA_FACING_FRONT, configuration.cameraFPS)
} else {
initCameraPreview(CAMERA_FACING_BACK, configuration.cameraFPS)
} else {
initCameraPreview(CAMERA_FACING_FRONT, configuration.cameraFPS)
}
if(cameraPreview != null) {
try {
Expand Down

0 comments on commit efa556c

Please sign in to comment.