Skip to content

Commit

Permalink
Aperture: Address missing ExperimentalCamera2Interop annotations
Browse files Browse the repository at this point in the history
CameraViewModel uses that, so we must use it here too.

Change-Id: I2d6f579d67b69ea4981406bb79704d38a09cc5cd
  • Loading branch information
luk1337 committed Jun 22, 2024
1 parent 3c5740d commit e1011b0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import android.widget.LinearLayout
import androidx.camera.camera2.interop.ExperimentalCamera2Interop
import androidx.core.view.doOnLayout
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
Expand All @@ -25,6 +26,7 @@ import org.lineageos.aperture.utils.TimeUtils
import org.lineageos.aperture.viewmodels.CameraViewModel
import kotlin.reflect.cast

@ExperimentalCamera2Interop
class CameraModeSelectorLayout @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : FrameLayout(context, attrs) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 The LineageOS Project
* SPDX-FileCopyrightText: 2022-2024 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -11,6 +11,7 @@ import android.net.Uri
import android.util.AttributeSet
import android.widget.ImageButton
import android.widget.ImageView
import androidx.camera.camera2.interop.ExperimentalCamera2Interop
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible
import androidx.lifecycle.Observer
Expand All @@ -29,6 +30,7 @@ import java.io.InputStream
/**
* Image/video preview fragment
*/
@ExperimentalCamera2Interop
class CapturePreviewLayout(context: Context, attrs: AttributeSet?) : ConstraintLayout(
context, attrs
) {
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/org/lineageos/aperture/ui/CountDownView.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SPDX-FileCopyrightText: 2014 The Android Open Source Project
* SPDX-FileCopyrightText: 2022-2023 The LineageOS Project
* SPDX-FileCopyrightText: 2022-2024 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -16,6 +16,7 @@ import android.view.LayoutInflater
import android.widget.FrameLayout
import android.widget.TextView
import androidx.annotation.IntRange
import androidx.camera.camera2.interop.ExperimentalCamera2Interop
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
import androidx.lifecycle.Observer
Expand All @@ -28,6 +29,7 @@ import org.lineageos.aperture.viewmodels.CameraViewModel
/**
* This class manages the looks of the countdown.
*/
@ExperimentalCamera2Interop
class CountDownView(context: Context, attrs: AttributeSet?) : FrameLayout(
context, attrs
) {
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/org/lineageos/aperture/ui/InfoChipView.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 The LineageOS Project
* SPDX-FileCopyrightText: 2023-2024 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -13,6 +13,7 @@ import android.os.BatteryManager
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.ImageView
import androidx.camera.camera2.interop.ExperimentalCamera2Interop
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
Expand All @@ -24,6 +25,7 @@ import org.lineageos.aperture.models.Rotation
import org.lineageos.aperture.viewmodels.CameraViewModel
import kotlin.math.roundToInt

@ExperimentalCamera2Interop
class InfoChipView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
Expand Down

0 comments on commit e1011b0

Please sign in to comment.