diff --git a/app/src/main/java/io/timelimit/android/ui/model/setup/SetupLocalModePermissions.kt b/app/src/main/java/io/timelimit/android/ui/model/setup/SetupLocalModePermissions.kt index 400de7b..fde83c0 100644 --- a/app/src/main/java/io/timelimit/android/ui/model/setup/SetupLocalModePermissions.kt +++ b/app/src/main/java/io/timelimit/android/ui/model/setup/SetupLocalModePermissions.kt @@ -1,5 +1,5 @@ /* - * TimeLimit Copyright 2019 - 2023 Jonas Lochmann + * TimeLimit Copyright 2019 - 2024 Jonas Lochmann * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ import io.timelimit.android.coroutines.executeAndWait import io.timelimit.android.crypto.Curve25519 import io.timelimit.android.data.Database import io.timelimit.android.integration.platform.PlatformIntegration +import io.timelimit.android.integration.platform.ProtectionLevel import io.timelimit.android.logic.AppLogic import io.timelimit.android.ui.manage.device.manage.permission.PermissionScreenContent import io.timelimit.android.ui.model.ActivityCommand @@ -89,7 +90,11 @@ object SetupLocalModePermissions { confirm = { launch { updateState { it.copy(currentDialog = null) } - setupParentKeyMode(logic.database) + if (logic.platformIntegration.getCurrentProtectionLevel() == ProtectionLevel.DeviceOwner) { + snackbarHostState.showSnackbar(logic.context.getString(R.string.setup_select_mode_parent_key_error_owner)) + } else { + setupParentKeyMode(logic.database) + } } }, cancel = { updateState { it.copy(currentDialog = null) } } ) else null, diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 199ccd5..e6adf82 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -1557,6 +1557,7 @@ TimeLimit schränkt dieses Gerät nicht ein. Es wird als zusätzlicher Schlüssel bei einem anderen Gerät im lokalen Mdous verwendet, um dort die Einstellungen von TimeLimit zu entsperren. Am anderen Gerät kann auch jederzeit ein Passwort verwendet werden. + TimeLimit ist Gerätebesitzer und kann nicht als Schlüssel eingerichtet werden. TimeLimit entfernen diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index edeb4d8..3d7e478 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1597,6 +1597,7 @@ unlock the settings of TimeLimit at an other device which uses the local mode (there is always a password to unlock the settings). + TimeLimit is device owner and can not be configured as a key. uninstall TimeLimit