From 1304872021a1a81b9279e77ac51b830676dec6b3 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Mon, 26 Aug 2024 17:06:07 +0200 Subject: [PATCH] Aperture: Remove unused variables Change-Id: Ibba4c7dbb4a8c8f02c3837a2381e3de205b5acfb --- .../main/java/org/lineageos/aperture/camera/BaseCamera.kt | 2 +- app/src/main/java/org/lineageos/aperture/camera/Camera.kt | 4 ++-- .../java/org/lineageos/aperture/camera/PhysicalCamera.kt | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/lineageos/aperture/camera/BaseCamera.kt b/app/src/main/java/org/lineageos/aperture/camera/BaseCamera.kt index 7f52c324..9e37bfce 100644 --- a/app/src/main/java/org/lineageos/aperture/camera/BaseCamera.kt +++ b/app/src/main/java/org/lineageos/aperture/camera/BaseCamera.kt @@ -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. */ diff --git a/app/src/main/java/org/lineageos/aperture/camera/Camera.kt b/app/src/main/java/org/lineageos/aperture/camera/Camera.kt index 556575ba..5226ad3f 100644 --- a/app/src/main/java/org/lineageos/aperture/camera/Camera.kt +++ b/app/src/main/java/org/lineageos/aperture/camera/Camera.kt @@ -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 diff --git a/app/src/main/java/org/lineageos/aperture/camera/PhysicalCamera.kt b/app/src/main/java/org/lineageos/aperture/camera/PhysicalCamera.kt index 91e35d86..2ddc16a1 100644 --- a/app/src/main/java/org/lineageos/aperture/camera/PhysicalCamera.kt +++ b/app/src/main/java/org/lineageos/aperture/camera/PhysicalCamera.kt @@ -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()