From 6fc21c7eb930beadd8881c77ad3010a2cd026f4f Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 1 Apr 2018 16:11:22 +0200 Subject: [PATCH] tweak window flags a bit --- .../simplemobiletools/camera/activities/MainActivity.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 0fdeb124..ba1ecf6a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -51,16 +51,15 @@ 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 + window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or - WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON) + WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON or + WindowManager.LayoutParams.FLAG_FULLSCREEN) useDynamicTheme = false super.onCreate(savedInstanceState) appLaunched() requestWindowFeature(Window.FEATURE_NO_TITLE) - window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN) if (config.alwaysOpenBackCamera) config.lastUsedCamera = Camera.CameraInfo.CAMERA_FACING_BACK