mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Rename from Tak centric to "Lockdown" mode
3 files renamed (via git mv, history preserved): - TakLockHandler.kt → LockdownHandler.kt - TakPassphraseStore.kt → LockdownPassphraseStore.kt - TakUnlockDialog.kt → LockdownUnlockDialog.kt 16 files updated with consistent renames across the entire codebase. No stray TAK-named symbols remain in any .kt or .aidl source file. What stayed the same (wire protocol / firmware-defined): - The firmware notification strings: "TAK_LOCKED", "TAK_NEEDS_PROVISION", "TAK_UNLOCKED", "TAK_UNLOCK_FAILED" — still matched as string literals in LockdownHandler.kt - Config.DeviceConfig.Role.TAK / TAK_TRACKER proto enum values - The SharedPrefs key changed from "tak_passphrase_store" → "lockdown_passphrase_store" (existing stored passphrases won't migrate automatically — users will need to re-enter on first launch of the updated app)
This commit is contained in:
parent
e7ba8e8497
commit
1ea87dbbad
19 changed files with 135 additions and 135 deletions
|
|
@ -147,11 +147,11 @@ constructor(
|
|||
private val _radioConfigState = MutableStateFlow(RadioConfigState())
|
||||
val radioConfigState: StateFlow<RadioConfigState> = _radioConfigState
|
||||
|
||||
fun sendTakLockNow() {
|
||||
meshService?.sendTakLockNow()
|
||||
fun sendLockNow() {
|
||||
meshService?.sendLockNow()
|
||||
}
|
||||
|
||||
val takTokenInfo = serviceRepository.takTokenInfo
|
||||
val lockdownTokenInfo = serviceRepository.lockdownTokenInfo
|
||||
|
||||
fun setPreserveFavorites(preserveFavorites: Boolean) {
|
||||
viewModelScope.launch { _radioConfigState.update { it.copy(nodeDbResetPreserveFavorites = preserveFavorites) } }
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ import java.security.SecureRandom
|
|||
@Composable
|
||||
fun SecurityConfigScreen(viewModel: RadioConfigViewModel = hiltViewModel(), onBack: () -> Unit) {
|
||||
val state by viewModel.radioConfigState.collectAsStateWithLifecycle()
|
||||
val takTokenInfo by viewModel.takTokenInfo.collectAsStateWithLifecycle(initialValue = null)
|
||||
val lockdownTokenInfo by viewModel.lockdownTokenInfo.collectAsStateWithLifecycle(initialValue = null)
|
||||
val node by viewModel.destNode.collectAsStateWithLifecycle()
|
||||
val securityConfig = state.radioConfig.security ?: Config.SecurityConfig()
|
||||
val formState = rememberConfigState(initialValue = securityConfig)
|
||||
|
|
@ -266,9 +266,9 @@ fun SecurityConfigScreen(viewModel: RadioConfigViewModel = hiltViewModel(), onBa
|
|||
title = "Lock Now",
|
||||
enabled = state.connected,
|
||||
icon = Icons.TwoTone.Warning,
|
||||
onClick = { viewModel.sendTakLockNow() },
|
||||
onClick = { viewModel.sendLockNow() },
|
||||
)
|
||||
takTokenInfo?.let { token ->
|
||||
lockdownTokenInfo?.let { token ->
|
||||
HorizontalDivider()
|
||||
val expiryMs = token.expiryEpoch * 1000L
|
||||
val expiryText = when {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue