Aperture: CapturePreviewLayout: Remove callback defined in XML layout

Change-Id: I02b9ad9987cd2794037ff93208cdbc07df9b999b
diff --git a/app/src/main/java/org/lineageos/aperture/CameraActivity.kt b/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
index 364f569..2ecad87 100644
--- a/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
+++ b/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
@@ -2483,8 +2483,6 @@
         finish()
     }
 
-    fun preventClicks(@Suppress("UNUSED_PARAMETER") view: View) {}
-
     companion object {
         private const val LOG_TAG = "Aperture"
 
diff --git a/app/src/main/java/org/lineageos/aperture/ui/CapturePreviewLayout.kt b/app/src/main/java/org/lineageos/aperture/ui/CapturePreviewLayout.kt
index 2d18bef..7b96b54 100644
--- a/app/src/main/java/org/lineageos/aperture/ui/CapturePreviewLayout.kt
+++ b/app/src/main/java/org/lineageos/aperture/ui/CapturePreviewLayout.kt
@@ -70,6 +70,10 @@
     override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
         super.onLayout(changed, left, top, right, bottom)
 
+        setOnClickListener {
+            // Prevent clicks behind the view
+        }
+
         cancelButton.setOnClickListener {
             stopPreview()
             onChoiceCallback(null)
diff --git a/app/src/main/res/layout/capture_preview_layout.xml b/app/src/main/res/layout/capture_preview_layout.xml
index 60a1ba9..3ab6553 100644
--- a/app/src/main/res/layout/capture_preview_layout.xml
+++ b/app/src/main/res/layout/capture_preview_layout.xml
@@ -7,8 +7,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@android:color/black"
-    android:onClick="preventClicks">
+    android:background="@android:color/black">
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/buttonsLayout"