mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-04-05 05:47:36 +03:00
fix: Screenshot protection #1870
This commit is contained in:
parent
6866b1a3bb
commit
4c30fa43d3
4 changed files with 18 additions and 3 deletions
|
@ -7,7 +7,7 @@ KeePassDX(4.1.0)
|
||||||
* Resets the advanced unlock expiration #1600
|
* Resets the advanced unlock expiration #1600
|
||||||
* Password entropy #1490 #1355
|
* Password entropy #1490 #1355
|
||||||
* Upgrade to API 34 (Android 14) #1730
|
* Upgrade to API 34 (Android 14) #1730
|
||||||
* Small fixes #1711 #1831 #1780 #1821 #1863 #1889 #1289 #1600 #1467
|
* Small fixes #1711 #1831 #1780 #1821 #1863 #1889 #1289 #1600 #1467 #1870
|
||||||
|
|
||||||
KeePassDX(4.0.8)
|
KeePassDX(4.0.8)
|
||||||
* Fix graphical bug that prevented databases from being opened on some versions of Android #1848 #1850
|
* Fix graphical bug that prevented databases from being opened on some versions of Android #1848 #1850
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
package com.kunzisoft.keepass.activities.dialogs
|
package com.kunzisoft.keepass.activities.dialogs
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import android.view.WindowManager.LayoutParams.FLAG_SECURE
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import com.kunzisoft.keepass.activities.legacy.DatabaseRetrieval
|
import com.kunzisoft.keepass.activities.legacy.DatabaseRetrieval
|
||||||
import com.kunzisoft.keepass.activities.legacy.resetAppTimeoutWhenViewTouchedOrFocused
|
import com.kunzisoft.keepass.activities.legacy.resetAppTimeoutWhenViewTouchedOrFocused
|
||||||
import com.kunzisoft.keepass.database.ContextualDatabase
|
import com.kunzisoft.keepass.database.ContextualDatabase
|
||||||
|
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.tasks.ActionRunnable
|
import com.kunzisoft.keepass.tasks.ActionRunnable
|
||||||
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
||||||
import com.kunzisoft.keepass.viewmodels.DatabaseViewModel
|
import com.kunzisoft.keepass.viewmodels.DatabaseViewModel
|
||||||
|
@ -29,6 +32,18 @@ abstract class DatabaseDialogFragment : DialogFragment(), DatabaseRetrieval {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
// Screenshot mode or hide views
|
||||||
|
context?.let {
|
||||||
|
if (PreferencesUtil.isScreenshotModeEnabled(it)) {
|
||||||
|
dialog?.window?.clearFlags(FLAG_SECURE)
|
||||||
|
} else {
|
||||||
|
dialog?.window?.setFlags(FLAG_SECURE, FLAG_SECURE)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||||
super.onActivityCreated(savedInstanceState)
|
super.onActivityCreated(savedInstanceState)
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
* Resets the advanced unlock expiration #1600
|
* Resets the advanced unlock expiration #1600
|
||||||
* Password entropy #1490 #1355
|
* Password entropy #1490 #1355
|
||||||
* Upgrade to API 34 (Android 14) #1730
|
* Upgrade to API 34 (Android 14) #1730
|
||||||
* Small fixes #1711 #1831 #1780 #1821 #1863 #1889 #1289 #1600 #1467
|
* Small fixes #1711 #1831 #1780 #1821 #1863 #1889 #1289 #1600 #1467 #1870
|
|
@ -5,4 +5,4 @@
|
||||||
* Correction des noms de domaines #1105 #1820
|
* Correction des noms de domaines #1105 #1820
|
||||||
* Entropie de mot de passe #1490 #1355
|
* Entropie de mot de passe #1490 #1355
|
||||||
* Mise à jour vers API 34 (Android 14)
|
* Mise à jour vers API 34 (Android 14)
|
||||||
* Petites corrections #1711 #1831 #1780 #1821 #1863 #1889 #1289 #1600 #1467
|
* Petites corrections #1711 #1831 #1780 #1821 #1863 #1889 #1289 #1600 #1467 #1870
|
Loading…
Add table
Add a link
Reference in a new issue