Add opt-in device credential app lock

This commit is contained in:
ajp_anton
2026-07-23 10:00:12 +00:00
parent 53cc4eb529
commit 6280c8ef80
4 changed files with 41 additions and 1 deletions
@@ -11,6 +11,7 @@ import se.ajpanton.notificationlog.settings.LogViewSettingsStore
import se.ajpanton.notificationlog.settings.TimestampZone
import se.ajpanton.notificationlog.settings.LoggingType
import se.ajpanton.notificationlog.settings.LoggingRuleStore
import se.ajpanton.notificationlog.settings.AppLockStore
import com.google.android.material.dialog.MaterialAlertDialogBuilder
class SettingsFragment : Fragment(R.layout.fragment_settings) {
@@ -46,6 +47,9 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
}
}
binding!!.copyEventSettings.setOnClickListener { chooseCopySource() }
val lockStore = AppLockStore(requireContext())
binding!!.appLock.isChecked = lockStore.enabled
binding!!.appLock.setOnCheckedChangeListener { _, enabled -> lockStore.enabled = enabled }
}
override fun onDestroyView() { binding = null; super.onDestroyView() }