Aperture: Add QrScannerActivity for Android T QS tile

Change-Id: Ia22298bd32e0e8119569b66c394b0db0d7c7d1de
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index d8e62d0..8e2ed73 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -71,6 +71,15 @@
             </intent-filter>
         </activity>
 
+        <activity
+            android:name=".QrScannerActivity"
+            android:configChanges="orientation|screenLayout|screenSize|smallestScreenSize|keyboardHidden"
+            android:exported="true"
+            android:screenOrientation="nosensor"
+            android:theme="@style/Theme.Aperture.Camera"
+            android:visibleToInstantApps="true"
+            android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
+
         <!-- Video camera and capture use the Camcorder label and icon. -->
         <activity-alias
             android:name=".VideoCamera"
diff --git a/app/src/main/java/org/lineageos/aperture/CameraActivity.kt b/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
index 903f040..e6a8855 100644
--- a/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
+++ b/app/src/main/java/org/lineageos/aperture/CameraActivity.kt
@@ -807,7 +807,7 @@
     /**
      * Change the current camera mode and restarts the stream
      */
-    private fun changeCameraMode(cameraMode: CameraMode) {
+    protected fun changeCameraMode(cameraMode: CameraMode) {
         if (!canRestartCamera()) {
             return
         }
diff --git a/app/src/main/java/org/lineageos/aperture/QrScannerActivity.kt b/app/src/main/java/org/lineageos/aperture/QrScannerActivity.kt
new file mode 100644
index 0000000..dbac278
--- /dev/null
+++ b/app/src/main/java/org/lineageos/aperture/QrScannerActivity.kt
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2022 The LineageOS Project
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package org.lineageos.aperture
+
+import android.os.Bundle
+import org.lineageos.aperture.utils.CameraMode
+
+@androidx.camera.camera2.interop.ExperimentalCamera2Interop
+class QrScannerActivity : CameraActivity() {
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        changeCameraMode(CameraMode.QR)
+    }
+}