Add opt-in device credential app lock
This commit is contained in:
@@ -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() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user