Complete secure log viewing and retention
This commit is contained in:
@@ -74,7 +74,7 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
}
|
||||
setupCopyControls()
|
||||
setupEventMasterToggles()
|
||||
binding!!.exportLogs.setOnClickListener { chooseExportFormat() }
|
||||
binding!!.exportLogs.setOnClickListener { confirmExport() }
|
||||
binding!!.clearLogs.setOnClickListener { confirmClearLogs() }
|
||||
val lockStore = AppLockStore(requireContext())
|
||||
binding!!.appLock.isChecked = lockStore.enabled
|
||||
@@ -177,6 +177,15 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun confirmExport() {
|
||||
MaterialAlertDialogBuilder(requireContext())
|
||||
.setTitle("Export unencrypted logs?")
|
||||
.setMessage("The exported file will not be encrypted. Anyone with access to its destination can read the selected log fields.")
|
||||
.setNegativeButton("Cancel", null)
|
||||
.setPositiveButton("Continue") { _, _ -> chooseExportFormat() }
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun writeExport(uri: Uri) {
|
||||
val format = pendingExport ?: return
|
||||
val context = requireContext().applicationContext
|
||||
|
||||
Reference in New Issue
Block a user