certificate: setup and Settings say that some newer cars reject the aasdk certificate, and that you import your own then

This commit is contained in:
Seb3thehacker committed 2026-10-26 15:15:42 -07:00
1 parent dbeaa9cf5e
commit 6ff59be6ab
3 files changed
+25 -5

No files matched your search

@@ -107,6 +107,16 @@ fun CertSetupScreen(onDone: () -> Unit) {
fontWeight = FontWeight.SemiBold,
color = MaterialTheme.colorScheme.primary,
)
// A downloaded certificate works in most cars, not all: say where to go when it doesn't.
if (!manualProgress) {
Text(
stringResource(R.string.certsetup_installed_hint),
style = MaterialTheme.typography.bodyMedium,
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(top = 8.dp),
)
}
Spacer(Modifier.height(20.dp))
Button(onClick = onDone, modifier = Modifier.fillMaxWidth().height(56.dp)) {
Text(stringResource(R.string.certsetup_continue))
@@ -255,7 +255,11 @@ private fun CertificateSection() {
if (uri != null) pendingUri = uri
}
SettingsSection(stringResource(R.string.settings_certificate), footer = notice ?: stringResource(R.string.cert_next_connection)) {
// With the aasdk certificate loaded, the footer says what to do when a car rejects it.
val certFooter = stringResource(
if (summary?.kind == CertProvider.Kind.DOWNLOADED) R.string.cert_downloaded_footer else R.string.cert_next_connection,
)
SettingsSection(stringResource(R.string.settings_certificate), footer = notice ?: certFooter) {
val s = summary
val loaded = s != null && s.kind != CertProvider.Kind.SELF_SIGNED
val hasDetails = s?.subject != null || s?.issuer != null