diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/WireGuardAutoTunnel.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/WireGuardAutoTunnel.kt index c271337..a10947a 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/WireGuardAutoTunnel.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/WireGuardAutoTunnel.kt @@ -49,7 +49,8 @@ class WireGuardAutoTunnel : Application() { ) } else Timber.plant(ReleaseTree()) applicationScope.launch(ioDispatcher) { - PinManager.initialize(this@WireGuardAutoTunnel) + //TODO disable pin lock for now + //PinManager.initialize(this@WireGuardAutoTunnel) if (!isRunningOnAndroidTv()) localLogCollector.start() } } diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/MainActivity.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/MainActivity.kt index 359ad28..584c864 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/MainActivity.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/MainActivity.kt @@ -202,7 +202,9 @@ class MainActivity : AppCompatActivity() { NavHost( navController, startDestination = - (if (PinManager.pinExists()) Screen.Lock.route else Screen.Main.route), + //TODO disable pin lock + //(if (PinManager.pinExists()) Screen.Lock.route else Screen.Main.route), + Screen.Main.route, modifier = Modifier .padding(padding) diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt index fbfa9c8..8db979b 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/settings/SettingsScreen.kt @@ -103,7 +103,7 @@ fun SettingsScreen( val scope = rememberCoroutineScope() val scrollState = rememberScrollState() val interactionSource = remember { MutableInteractionSource() } - val pinExists = remember { mutableStateOf(PinManager.pinExists()) } + //val pinExists = remember { mutableStateOf(PinManager.pinExists()) } val uiState by viewModel.uiState.collectAsStateWithLifecycle() val kernelSupport by viewModel.kernelSupport.collectAsStateWithLifecycle() @@ -652,20 +652,21 @@ fun SettingsScreen( onCheckChanged = { viewModel.onToggleShortcutsEnabled() }, ) } - ConfigurationToggle( - stringResource(R.string.enable_app_lock), - enabled = true, - checked = pinExists.value, - padding = screenPadding, - onCheckChanged = { - if (pinExists.value) { - PinManager.clearPin() - pinExists.value = PinManager.pinExists() - } else { - navController.navigate(Screen.Lock.route) - } - }, - ) + // TODO disable for now +// ConfigurationToggle( +// stringResource(R.string.enable_app_lock), +// enabled = true, +// checked = pinExists.value, +// padding = screenPadding, +// onCheckChanged = { +// if (pinExists.value) { +// PinManager.clearPin() +// pinExists.value = PinManager.pinExists() +// } else { +// navController.navigate(Screen.Lock.route) +// } +// }, +// ) if (!WireGuardAutoTunnel.isRunningOnAndroidTv()) { Row( verticalAlignment = Alignment.CenterVertically,