* Adds KTLint as a GitHub action * Adds KTLint to the gradle project for IDE integration * Adds .editorconfig to configure KTLint (android/)
16 lines
457 B
Kotlin
16 lines
457 B
Kotlin
package com.mrousavy.camera.parsers
|
|
|
|
import android.hardware.camera2.CameraCharacteristics
|
|
|
|
/**
|
|
* Parses Lens Facing int to a string representation useable for the TypeScript types.
|
|
*/
|
|
fun parseLensFacing(lensFacing: Int?): String? {
|
|
return when (lensFacing) {
|
|
CameraCharacteristics.LENS_FACING_BACK -> "back"
|
|
CameraCharacteristics.LENS_FACING_FRONT -> "front"
|
|
CameraCharacteristics.LENS_FACING_EXTERNAL -> "external"
|
|
else -> null
|
|
}
|
|
}
|