Skip to content

Commit

Permalink
Aperture: Remove unused variables
Browse files Browse the repository at this point in the history
Change-Id: Ibba4c7dbb4a8c8f02c3837a2381e3de205b5acfb
  • Loading branch information
luk1337 committed Aug 26, 2024
1 parent 30b7c1f commit 1304872
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import kotlin.reflect.safeCast
*/
@androidx.camera.camera2.interop.ExperimentalCamera2Interop
@androidx.camera.core.ExperimentalLensFacing
abstract class BaseCamera(cameraInfo: CameraInfo, model: CameraViewModel) {
abstract class BaseCamera(cameraInfo: CameraInfo) {
/**
* The [CameraSelector] for this camera.
*/
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/lineageos/aperture/camera/Camera.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import org.lineageos.aperture.viewmodels.CameraViewModel
@androidx.camera.camera2.interop.ExperimentalCamera2Interop
@androidx.camera.core.ExperimentalLensFacing
@androidx.camera.core.ExperimentalZeroShutterLag
class Camera(cameraInfo: CameraInfo, model: CameraViewModel) : BaseCamera(cameraInfo, model) {
class Camera(cameraInfo: CameraInfo, model: CameraViewModel) : BaseCamera(cameraInfo) {
override val cameraSelector = cameraInfo.cameraSelector

val exposureCompensationRange = cameraInfo.exposureState.exposureCompensationRange
private val hasFlashUnit = cameraInfo.hasFlashUnit()

private val physicalCameras = cameraInfo.physicalCameraInfos.map {
PhysicalCamera(it, model, this)
PhysicalCamera(it)
}
val isLogical = physicalCameras.size > 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ import org.lineageos.aperture.viewmodels.CameraViewModel
@androidx.camera.camera2.interop.ExperimentalCamera2Interop
@androidx.camera.core.ExperimentalLensFacing
class PhysicalCamera(
cameraInfo: CameraInfo,
model: CameraViewModel,
logicalCamera: Camera,
) : BaseCamera(cameraInfo, model) {
cameraInfo: CameraInfo
) : BaseCamera(cameraInfo) {
override val cameraSelector = CameraSelector.Builder()
.setPhysicalCameraId(cameraId)
.build()
Expand Down

0 comments on commit 1304872

Please sign in to comment.