-
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathSettingsActivity.kt
More file actions
588 lines (532 loc) · 23.7 KB
/
SettingsActivity.kt
File metadata and controls
588 lines (532 loc) · 23.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
package org.fossify.notes.activities
import android.app.AlarmManager
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.Menu
import androidx.activity.result.contract.ActivityResultContracts
import androidx.core.text.TextUtilsCompat
import androidx.core.view.ViewCompat
import kotlinx.serialization.SerializationException
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import org.fossify.commons.dialogs.ConfirmationDialog
import org.fossify.commons.dialogs.PermissionRequiredDialog
import org.fossify.commons.dialogs.RadioGroupDialog
import org.fossify.commons.dialogs.SecurityDialog
import org.fossify.commons.extensions.beGone
import org.fossify.commons.extensions.beVisible
import org.fossify.commons.extensions.beVisibleIf
import org.fossify.commons.extensions.getProperPrimaryColor
import org.fossify.commons.extensions.openRequestExactAlarmSettings
import org.fossify.commons.extensions.showErrorToast
import org.fossify.commons.extensions.toast
import org.fossify.commons.extensions.updateTextColors
import org.fossify.commons.extensions.viewBinding
import org.fossify.commons.helpers.IS_CUSTOMIZING_COLORS
import org.fossify.commons.helpers.NavigationIcon
import org.fossify.commons.helpers.PROTECTION_FINGERPRINT
import org.fossify.commons.helpers.SHOW_ALL_TABS
import org.fossify.commons.helpers.ensureBackgroundThread
import org.fossify.commons.helpers.isOreoPlus
import org.fossify.commons.helpers.isQPlus
import org.fossify.commons.helpers.isRPlus
import org.fossify.commons.helpers.isSPlus
import org.fossify.commons.helpers.isTiramisuPlus
import org.fossify.commons.models.RadioItem
import org.fossify.notes.BuildConfig
import org.fossify.notes.R
import org.fossify.notes.databinding.ActivitySettingsBinding
import org.fossify.notes.dialogs.ExportNotesDialog
import org.fossify.notes.dialogs.ManageAutoBackupsDialog
import org.fossify.notes.extensions.cancelScheduledAutomaticBackup
import org.fossify.notes.extensions.config
import org.fossify.notes.extensions.requestUnlockNotes
import org.fossify.notes.extensions.scheduleNextAutomaticBackup
import org.fossify.notes.extensions.updateWidgets
import org.fossify.notes.extensions.widgetsDB
import org.fossify.notes.helpers.CUSTOMIZED_WIDGET_BG_COLOR
import org.fossify.notes.helpers.CUSTOMIZED_WIDGET_ID
import org.fossify.notes.helpers.CUSTOMIZED_WIDGET_KEY_ID
import org.fossify.notes.helpers.CUSTOMIZED_WIDGET_NOTE_ID
import org.fossify.notes.helpers.CUSTOMIZED_WIDGET_SHOW_TITLE
import org.fossify.notes.helpers.CUSTOMIZED_WIDGET_TEXT_COLOR
import org.fossify.notes.helpers.FONT_SIZE_100_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_125_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_150_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_175_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_200_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_250_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_300_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_50_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_60_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_75_PERCENT
import org.fossify.notes.helpers.FONT_SIZE_90_PERCENT
import org.fossify.notes.helpers.GRAVITY_CENTER
import org.fossify.notes.helpers.GRAVITY_END
import org.fossify.notes.helpers.GRAVITY_START
import org.fossify.notes.helpers.NotesHelper
import org.fossify.notes.models.Note
import org.fossify.notes.models.Widget
import java.util.Locale
import kotlin.system.exitProcess
class SettingsActivity : SimpleActivity() {
private val notesFileType = "application/json"
private val notesImportFileTypes = buildList {
add("application/json")
if (!isQPlus()) {
// Workaround for https://github.com/FossifyOrg/Notes/issues/34
add("application/octet-stream")
}
}
private val binding by viewBinding(ActivitySettingsBinding::inflate)
override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(binding.root)
updateMaterialActivityViews(
mainCoordinatorLayout = binding.settingsCoordinator,
nestedView = binding.settingsHolder,
useTransparentNavigation = true,
useTopSearchMenu = false
)
setupMaterialScrollListener(binding.settingsNestedScrollview, binding.settingsToolbar)
}
override fun onResume() {
super.onResume()
setupToolbar(binding.settingsToolbar, NavigationIcon.Arrow)
setupCustomizeColors()
setupUseEnglish()
setupLanguage()
setupAutosaveNotes()
setupDisplaySuccess()
setupClickableLinks()
setupMonospacedFont()
setupShowKeyboard()
setupShowNotePicker()
setupMoveUndoneChecklistItems()
setupShowWordCount()
setupEnableLineWrap()
setupFontSize()
setupGravity()
setupCursorPlacement()
setupIncognitoMode()
setupCustomizeWidgetColors()
setupNotesExport()
setupNotesImport()
setupEnableAutomaticBackups()
setupManageAutomaticBackups()
setupAppPasswordProtection()
setupNoteDeletionPasswordProtection()
updateTextColors(binding.settingsNestedScrollview)
arrayOf(
binding.settingsColorCustomizationSectionLabel,
binding.settingsGeneralSettingsLabel,
binding.settingsTextLabel,
binding.settingsStartupLabel,
binding.settingsSavingLabel,
binding.settingsSecurityLabel,
binding.settingsMigratingLabel,
binding.settingsBackupsLabel,
).forEach {
it.setTextColor(getProperPrimaryColor())
}
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
updateMenuItemColors(menu)
return super.onCreateOptionsMenu(menu)
}
private val getContent =
registerForActivityResult(ActivityResultContracts.OpenDocument()) { uri ->
if (uri != null) {
toast(org.fossify.commons.R.string.importing)
importNotes(uri)
}
}
private val saveDocument =
registerForActivityResult(ActivityResultContracts.CreateDocument(notesFileType)) { uri ->
if (uri != null) {
toast(org.fossify.commons.R.string.exporting)
NotesHelper(this).getNotes { notes ->
requestUnlockNotes(notes) { unlockedNotes ->
val notLockedNotes = notes.filterNot { it.isLocked() }
val notesToExport = unlockedNotes + notLockedNotes
exportNotes(notesToExport, uri)
}
}
}
}
private fun setupCustomizeColors() {
binding.settingsColorCustomizationHolder.setOnClickListener {
startCustomizationActivity()
}
}
private fun setupUseEnglish() {
binding.settingsUseEnglishHolder.beVisibleIf((config.wasUseEnglishToggled || Locale.getDefault().language != "en") && !isTiramisuPlus())
binding.settingsUseEnglish.isChecked = config.useEnglish
binding.settingsUseEnglishHolder.setOnClickListener {
binding.settingsUseEnglish.toggle()
config.useEnglish = binding.settingsUseEnglish.isChecked
exitProcess(0)
}
}
private fun setupLanguage() {
binding.settingsLanguage.text = Locale.getDefault().displayLanguage
if (isTiramisuPlus()) {
binding.settingsLanguageHolder.beVisible()
binding.settingsLanguageHolder.setOnClickListener {
launchChangeAppLanguageIntent()
}
} else {
binding.settingsLanguageHolder.beGone()
}
}
private fun setupAutosaveNotes() {
binding.settingsAutosaveNotes.isChecked = config.autosaveNotes
binding.settingsAutosaveNotesHolder.setOnClickListener {
binding.settingsAutosaveNotes.toggle()
config.autosaveNotes = binding.settingsAutosaveNotes.isChecked
}
}
private fun setupDisplaySuccess() {
binding.settingsDisplaySuccess.isChecked = config.displaySuccess
binding.settingsDisplaySuccessHolder.setOnClickListener {
binding.settingsDisplaySuccess.toggle()
config.displaySuccess = binding.settingsDisplaySuccess.isChecked
}
}
private fun setupClickableLinks() {
binding.settingsClickableLinks.isChecked = config.clickableLinks
binding.settingsClickableLinksHolder.setOnClickListener {
binding.settingsClickableLinks.toggle()
config.clickableLinks = binding.settingsClickableLinks.isChecked
}
}
private fun setupMonospacedFont() {
binding.settingsMonospacedFont.isChecked = config.monospacedFont
binding.settingsMonospacedFontHolder.setOnClickListener {
binding.settingsMonospacedFont.toggle()
config.monospacedFont = binding.settingsMonospacedFont.isChecked
updateWidgets()
}
}
private fun setupShowKeyboard() {
binding.settingsShowKeyboard.isChecked = config.showKeyboard
binding.settingsShowKeyboardHolder.setOnClickListener {
binding.settingsShowKeyboard.toggle()
config.showKeyboard = binding.settingsShowKeyboard.isChecked
}
}
private fun setupShowNotePicker() {
NotesHelper(this).getNotes {
binding.settingsShowNotePickerHolder.beVisibleIf(it.size > 1)
}
binding.settingsShowNotePicker.isChecked = config.showNotePicker
binding.settingsShowNotePickerHolder.setOnClickListener {
binding.settingsShowNotePicker.toggle()
config.showNotePicker = binding.settingsShowNotePicker.isChecked
}
}
private fun setupMoveUndoneChecklistItems() {
binding.settingsMoveUndoneChecklistItems.isChecked = config.moveDoneChecklistItems
binding.settingsMoveUndoneChecklistItemsHolder.setOnClickListener {
binding.settingsMoveUndoneChecklistItems.toggle()
config.moveDoneChecklistItems = binding.settingsMoveUndoneChecklistItems.isChecked
}
}
private fun setupShowWordCount() {
binding.settingsShowWordCount.isChecked = config.showWordCount
binding.settingsShowWordCountHolder.setOnClickListener {
binding.settingsShowWordCount.toggle()
config.showWordCount = binding.settingsShowWordCount.isChecked
}
}
private fun setupEnableLineWrap() {
binding.settingsEnableLineWrap.isChecked = config.enableLineWrap
binding.settingsEnableLineWrapHolder.setOnClickListener {
binding.settingsEnableLineWrap.toggle()
config.enableLineWrap = binding.settingsEnableLineWrap.isChecked
}
}
private fun setupFontSize() {
binding.settingsFontSize.text = getFontSizePercentText(config.fontSizePercentage)
binding.settingsFontSizeHolder.setOnClickListener {
val items = arrayListOf(
RadioItem(FONT_SIZE_50_PERCENT, getFontSizePercentText(FONT_SIZE_50_PERCENT)),
RadioItem(FONT_SIZE_60_PERCENT, getFontSizePercentText(FONT_SIZE_60_PERCENT)),
RadioItem(FONT_SIZE_75_PERCENT, getFontSizePercentText(FONT_SIZE_75_PERCENT)),
RadioItem(FONT_SIZE_90_PERCENT, getFontSizePercentText(FONT_SIZE_90_PERCENT)),
RadioItem(FONT_SIZE_100_PERCENT, getFontSizePercentText(FONT_SIZE_100_PERCENT)),
RadioItem(FONT_SIZE_125_PERCENT, getFontSizePercentText(FONT_SIZE_125_PERCENT)),
RadioItem(FONT_SIZE_150_PERCENT, getFontSizePercentText(FONT_SIZE_150_PERCENT)),
RadioItem(FONT_SIZE_175_PERCENT, getFontSizePercentText(FONT_SIZE_175_PERCENT)),
RadioItem(FONT_SIZE_200_PERCENT, getFontSizePercentText(FONT_SIZE_200_PERCENT)),
RadioItem(FONT_SIZE_250_PERCENT, getFontSizePercentText(FONT_SIZE_250_PERCENT)),
RadioItem(FONT_SIZE_300_PERCENT, getFontSizePercentText(FONT_SIZE_300_PERCENT))
)
RadioGroupDialog(this@SettingsActivity, items, config.fontSizePercentage) {
config.fontSizePercentage = it as Int
binding.settingsFontSize.text = getFontSizePercentText(config.fontSizePercentage)
updateWidgets()
}
}
}
private fun getFontSizePercentText(fontSizePercentage: Int): String = "$fontSizePercentage%"
private fun setupGravity() {
binding.settingsGravity.text = getGravityText()
binding.settingsGravityHolder.setOnClickListener {
val items = listOf(GRAVITY_START, GRAVITY_CENTER, GRAVITY_END).map {
RadioItem(it, getGravityOptionLabel(it))
}
RadioGroupDialog(this@SettingsActivity, ArrayList(items), config.gravity) {
config.gravity = it as Int
binding.settingsGravity.text = getGravityText()
updateWidgets()
}
}
}
private fun getGravityOptionLabel(gravity: Int): String {
val leftToRightDirection = TextUtilsCompat
.getLayoutDirectionFromLocale(Locale.getDefault()) == ViewCompat.LAYOUT_DIRECTION_LTR
val leftRightLabels = listOf(R.string.left, R.string.right)
val startEndLabels = if (leftToRightDirection) {
leftRightLabels
} else {
leftRightLabels.reversed()
}
return getString(
when (gravity) {
GRAVITY_START -> startEndLabels.first()
GRAVITY_CENTER -> R.string.center
else -> startEndLabels.last()
}
)
}
private fun getGravityText() = getGravityOptionLabel(config.gravity)
private fun setupCursorPlacement() {
binding.settingsCursorPlacement.isChecked = config.placeCursorToEnd
binding.settingsCursorPlacementHolder.setOnClickListener {
binding.settingsCursorPlacement.toggle()
config.placeCursorToEnd = binding.settingsCursorPlacement.isChecked
}
}
private fun setupCustomizeWidgetColors() {
var widgetToCustomize: Widget? = null
binding.settingsWidgetColorCustomizationHolder.setOnClickListener {
Intent(this, WidgetConfigureActivity::class.java).apply {
putExtra(IS_CUSTOMIZING_COLORS, true)
widgetToCustomize?.apply {
putExtra(CUSTOMIZED_WIDGET_ID, widgetId)
putExtra(CUSTOMIZED_WIDGET_KEY_ID, id)
putExtra(CUSTOMIZED_WIDGET_NOTE_ID, noteId)
putExtra(CUSTOMIZED_WIDGET_BG_COLOR, widgetBgColor)
putExtra(CUSTOMIZED_WIDGET_TEXT_COLOR, widgetTextColor)
putExtra(CUSTOMIZED_WIDGET_SHOW_TITLE, widgetShowTitle)
}
startActivity(this)
}
}
ensureBackgroundThread {
val widgets = widgetsDB.getWidgets().filter { it.widgetId != 0 }
if (widgets.size == 1) {
widgetToCustomize = widgets.first()
}
}
}
private fun setupIncognitoMode() {
binding.settingsUseIncognitoModeHolder.beVisibleIf(isOreoPlus())
binding.settingsUseIncognitoMode.isChecked = config.useIncognitoMode
binding.settingsUseIncognitoModeHolder.setOnClickListener {
binding.settingsUseIncognitoMode.toggle()
config.useIncognitoMode = binding.settingsUseIncognitoMode.isChecked
}
}
private fun setupNotesExport() {
binding.settingsExportNotesHolder.setOnClickListener {
ExportNotesDialog(this) { filename ->
saveDocument.launch("$filename.json")
}
}
}
private fun setupNotesImport() {
binding.settingsImportNotesHolder.setOnClickListener {
getContent.launch(notesImportFileTypes.toTypedArray())
}
}
private fun exportNotes(notes: List<Note>, uri: Uri) {
if (notes.isEmpty()) {
toast(org.fossify.commons.R.string.no_entries_for_exporting)
} else {
try {
val outputStream = contentResolver.openOutputStream(uri)!!
val jsonString = Json.encodeToString(notes)
outputStream.use {
it.write(jsonString.toByteArray())
}
toast(org.fossify.commons.R.string.exporting_successful)
} catch (e: Exception) {
showErrorToast(e)
}
}
}
private fun importNotes(uri: Uri) {
try {
val jsonString = contentResolver.openInputStream(uri)!!.use { inputStream ->
inputStream.bufferedReader().readText()
}
val objects = Json.decodeFromString<List<Note>>(jsonString)
if (objects.isEmpty()) {
toast(org.fossify.commons.R.string.no_entries_for_importing)
return
}
NotesHelper(this).importNotes(this, objects) { importResult ->
when (importResult) {
NotesHelper.ImportResult.IMPORT_OK -> toast(org.fossify.commons.R.string.importing_successful)
NotesHelper.ImportResult.IMPORT_PARTIAL -> toast(org.fossify.commons.R.string.importing_some_entries_failed)
NotesHelper.ImportResult.IMPORT_NOTHING_NEW -> toast(org.fossify.commons.R.string.no_new_items)
else -> toast(org.fossify.commons.R.string.importing_failed)
}
}
} catch (_: SerializationException) {
toast(org.fossify.commons.R.string.invalid_file_format)
} catch (_: IllegalArgumentException) {
toast(org.fossify.commons.R.string.invalid_file_format)
} catch (e: Exception) {
showErrorToast(e)
}
}
private fun setupEnableAutomaticBackups() {
binding.settingsBackupsLabel.beVisibleIf(isRPlus())
binding.settingsEnableAutomaticBackupsHolder.beVisibleIf(isRPlus())
binding.settingsEnableAutomaticBackups.isChecked = config.autoBackup
binding.settingsEnableAutomaticBackupsHolder.setOnClickListener {
val wasBackupDisabled = !config.autoBackup
if (wasBackupDisabled) {
maybeRequestExactAlarmPermission {
ManageAutoBackupsDialog(
activity = this,
onSuccess = {
enableOrDisableAutomaticBackups(true)
scheduleNextAutomaticBackup()
}
)
}
} else {
cancelScheduledAutomaticBackup()
enableOrDisableAutomaticBackups(false)
}
}
}
private fun setupManageAutomaticBackups() {
binding.settingsManageAutomaticBackupsHolder.beVisibleIf(isRPlus() && config.autoBackup)
binding.settingsManageAutomaticBackupsHolder.setOnClickListener {
ManageAutoBackupsDialog(
activity = this,
onSuccess = {
scheduleNextAutomaticBackup()
}
)
}
}
private fun enableOrDisableAutomaticBackups(enable: Boolean) {
config.autoBackup = enable
binding.settingsEnableAutomaticBackups.isChecked = enable
binding.settingsManageAutomaticBackupsHolder.beVisibleIf(enable)
}
private fun maybeRequestExactAlarmPermission(callback: () -> Unit = {}) {
if (isSPlus()) {
val alarmManager: AlarmManager = getSystemService(ALARM_SERVICE) as AlarmManager
if (alarmManager.canScheduleExactAlarms()) {
callback()
} else {
PermissionRequiredDialog(
activity = this,
textId = R.string.allow_alarm_automatic_backups,
positiveActionCallback = {
openRequestExactAlarmSettings(BuildConfig.APPLICATION_ID)
},
)
}
} else {
callback()
}
}
private fun setupAppPasswordProtection() {
binding.settingsAppPasswordProtection.isChecked = config.isAppPasswordProtectionOn
binding.settingsAppPasswordProtectionHolder.setOnClickListener {
val tabToShow = if (config.isAppPasswordProtectionOn) {
config.appProtectionType
} else {
SHOW_ALL_TABS
}
SecurityDialog(
activity = this,
requiredHash = config.appPasswordHash,
showTabIndex = tabToShow
) { hash, type, success ->
if (success) {
val hasPasswordProtection = config.isAppPasswordProtectionOn
binding.settingsAppPasswordProtection.isChecked = !hasPasswordProtection
config.isAppPasswordProtectionOn = !hasPasswordProtection
config.appPasswordHash = if (hasPasswordProtection) "" else hash
config.appProtectionType = type
if (config.isAppPasswordProtectionOn) {
val confirmationTextId =
if (config.appProtectionType == PROTECTION_FINGERPRINT) {
org.fossify.commons.R.string.fingerprint_setup_successfully
} else {
org.fossify.commons.R.string.protection_setup_successfully
}
ConfirmationDialog(
activity = this,
message = "",
messageId = confirmationTextId,
positive = org.fossify.commons.R.string.ok,
negative = 0
) { }
}
}
}
}
}
private fun setupNoteDeletionPasswordProtection() {
binding.settingsNoteDeletionPasswordProtection.isChecked =
config.isDeletePasswordProtectionOn
binding.settingsNoteDeletionPasswordProtectionHolder.setOnClickListener {
val tabToShow = if (config.isDeletePasswordProtectionOn) {
config.deleteProtectionType
} else {
SHOW_ALL_TABS
}
SecurityDialog(
activity = this,
requiredHash = config.deletePasswordHash,
showTabIndex = tabToShow
) { hash, type, success ->
if (success) {
val hasPasswordProtection = config.isDeletePasswordProtectionOn
binding.settingsNoteDeletionPasswordProtection.isChecked =
!hasPasswordProtection
config.isDeletePasswordProtectionOn = !hasPasswordProtection
config.deletePasswordHash = if (hasPasswordProtection) "" else hash
config.deleteProtectionType = type
if (config.isDeletePasswordProtectionOn) {
val confirmationTextId =
if (config.deleteProtectionType == PROTECTION_FINGERPRINT) {
org.fossify.commons.R.string.fingerprint_setup_successfully
} else {
org.fossify.commons.R.string.protection_setup_successfully
}
ConfirmationDialog(
activity = this,
message = "",
messageId = confirmationTextId,
positive = org.fossify.commons.R.string.ok,
negative = 0
) { }
}
}
}
}
}
}