tweak window flags a bit

This commit is contained in:
tibbi 2018-04-01 16:11:22 +02:00
parent b55ebb669c
commit 6fc21c7eb9
1 changed files with 3 additions and 4 deletions

View File

@ -51,16 +51,15 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
lateinit var mOrientationEventListener: OrientationEventListener lateinit var mOrientationEventListener: OrientationEventListener
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED 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 useDynamicTheme = false
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
appLaunched() appLaunched()
requestWindowFeature(Window.FEATURE_NO_TITLE) requestWindowFeature(Window.FEATURE_NO_TITLE)
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
if (config.alwaysOpenBackCamera) if (config.alwaysOpenBackCamera)
config.lastUsedCamera = Camera.CameraInfo.CAMERA_FACING_BACK config.lastUsedCamera = Camera.CameraInfo.CAMERA_FACING_BACK