mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 12:35:30 +03:00
properly clear the flag
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
parent
a8268cd7d2
commit
a26562bd5d
2 changed files with 10 additions and 1 deletions
|
@ -101,7 +101,7 @@ open class BaseActivity : AppCompatActivity() {
|
|||
disableKeyboardPersonalisedLearning(viewGroup)
|
||||
}
|
||||
|
||||
if (appPreferences.isScreenSecured || appPreferences.isScreenLocked) {
|
||||
if (appPreferences.isScreenSecured) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
} else {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.content.Context
|
|||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import androidx.activity.result.ActivityResult
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
@ -49,6 +50,9 @@ class LockedActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
|
||||
NextcloudTalkApplication.sharedApplication!!.componentApplication.inject(this)
|
||||
|
||||
binding = ActivityLockedBinding.inflate(layoutInflater)
|
||||
|
@ -144,6 +148,11 @@ class LockedActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val TAG = LockedActivity::class.java.simpleName
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue