allow the app be ran over lockscreen

This commit is contained in:
tibbi 2018-04-01 16:07:04 +02:00
parent f73f8ad1c5
commit b55ebb669c
3 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@
<uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission <uses-permission
android:name="android.permission.USE_FINGERPRINT" android:name="android.permission.USE_FINGERPRINT"
@ -40,6 +41,7 @@
<activity <activity
android:name=".activities.MainActivity" android:name=".activities.MainActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:showOnLockScreen="true"
android:theme="@style/FullScreenTheme"> android:theme="@style/FullScreenTheme">
<intent-filter> <intent-filter>

View File

@ -51,6 +51,11 @@ 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
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON)
useDynamicTheme = false useDynamicTheme = false
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
appLaunched() appLaunched()

View File

@ -3,7 +3,6 @@ package com.simplemobiletools.camera.receivers
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.simplemobiletools.camera.activities.MainActivity import com.simplemobiletools.camera.activities.MainActivity
class HardwareShutterReceiver : BroadcastReceiver() { class HardwareShutterReceiver : BroadcastReceiver() {