diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cee64988..83b9b4e8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,6 +14,7 @@ + diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt index 9e264798..0fdeb124 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -51,6 +51,11 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave lateinit var mOrientationEventListener: OrientationEventListener override fun onCreate(savedInstanceState: Bundle?) { + window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or + WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or + WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or + WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON) + useDynamicTheme = false super.onCreate(savedInstanceState) appLaunched() diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/receivers/HardwareShutterReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/camera/receivers/HardwareShutterReceiver.kt index 08ca4cf6..413900a9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/receivers/HardwareShutterReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/receivers/HardwareShutterReceiver.kt @@ -3,7 +3,6 @@ package com.simplemobiletools.camera.receivers import android.content.BroadcastReceiver import android.content.Context import android.content.Intent - import com.simplemobiletools.camera.activities.MainActivity class HardwareShutterReceiver : BroadcastReceiver() {