mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-10 16:02:25 +01:00
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:
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,
|
fontWeight = FontWeight.SemiBold,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
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))
|
Spacer(Modifier.height(20.dp))
|
||||||
Button(onClick = onDone, modifier = Modifier.fillMaxWidth().height(56.dp)) {
|
Button(onClick = onDone, modifier = Modifier.fillMaxWidth().height(56.dp)) {
|
||||||
Text(stringResource(R.string.certsetup_continue))
|
Text(stringResource(R.string.certsetup_continue))
|
||||||
|
|||||||
@@ -255,7 +255,11 @@ private fun CertificateSection() {
|
|||||||
if (uri != null) pendingUri = uri
|
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 s = summary
|
||||||
val loaded = s != null && s.kind != CertProvider.Kind.SELF_SIGNED
|
val loaded = s != null && s.kind != CertProvider.Kind.SELF_SIGNED
|
||||||
val hasDetails = s?.subject != null || s?.issuer != null
|
val hasDetails = s?.subject != null || s?.issuer != null
|
||||||
|
|||||||
@@ -125,9 +125,9 @@
|
|||||||
<string name="cert_download">Download from aasdk</string>
|
<string name="cert_download">Download from aasdk</string>
|
||||||
<string name="cert_downloaded">Certificate downloaded.</string>
|
<string name="cert_downloaded">Certificate downloaded.</string>
|
||||||
<string name="cert_download_failed">Download failed: %1$s</string>
|
<string name="cert_download_failed">Download failed: %1$s</string>
|
||||||
<string name="cert_download_sub">The certificate the open-source aasdk project publishes on GitHub. Gearslip doesn\'t include one</string>
|
<string name="cert_download_sub">The certificate the open-source aasdk project publishes on GitHub. Most cars accept it, but some from around 2020 on reject it</string>
|
||||||
<string name="cert_import">Import my own file</string>
|
<string name="cert_import">Import my own file</string>
|
||||||
<string name="cert_import_sub">A .p12 file with its private key, from wherever you choose</string>
|
<string name="cert_import_sub">A .p12 file with its private key. Use your own when your car rejects the aasdk certificate</string>
|
||||||
<string name="cert_remove_imported">Remove imported certificate</string>
|
<string name="cert_remove_imported">Remove imported certificate</string>
|
||||||
<string name="cert_remove_downloaded">Remove downloaded certificate</string>
|
<string name="cert_remove_downloaded">Remove downloaded certificate</string>
|
||||||
<string name="cert_removed_imported">Removed the imported certificate.</string>
|
<string name="cert_removed_imported">Removed the imported certificate.</string>
|
||||||
@@ -330,13 +330,13 @@
|
|||||||
<string name="certsetup_continue">Continue</string>
|
<string name="certsetup_continue">Continue</string>
|
||||||
<string name="certsetup_failed">Download failed</string>
|
<string name="certsetup_failed">Download failed</string>
|
||||||
<string name="certsetup_retry">Retry</string>
|
<string name="certsetup_retry">Retry</string>
|
||||||
<string name="certsetup_import_sub">A .p12 file with its private key, from wherever you choose.</string>
|
<string name="certsetup_import_sub">A .p12 file with its private key. Use your own when your car rejects the aasdk certificate.</string>
|
||||||
<string name="certsetup_skip">Skip car connection setup</string>
|
<string name="certsetup_skip">Skip car connection setup</string>
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<string name="certsetup_loaded">Cars accept only Google-issued certificates, and you have one loaded.</string>
|
<string name="certsetup_loaded">Cars accept only Google-issued certificates, and you have one loaded.</string>
|
||||||
<string name="certsetup_choose">Cars accept only Google-issued certificates. Gearslip doesn\'t include one, so choose where yours comes from.</string>
|
<string name="certsetup_choose">Cars accept only Google-issued certificates. Gearslip doesn\'t include one, so choose where yours comes from.</string>
|
||||||
<string name="certsetup_aasdk_sub">The open-source aasdk project publishes this certificate at github.com/opencardev/aasdk. Most cars accept it; some from around 2020 on don\'t.</string>
|
<string name="certsetup_aasdk_sub">The open-source aasdk project publishes this certificate at github.com/opencardev/aasdk. Most cars accept it. Some from around 2020 on reject it, and then you need to import your own.</string>
|
||||||
|
|
||||||
<!-- Storage -->
|
<!-- Storage -->
|
||||||
<string name="storage_title">Gearslip storage</string>
|
<string name="storage_title">Gearslip storage</string>
|
||||||
@@ -840,4 +840,10 @@
|
|||||||
<item quantity="one">%1$d meter</item>
|
<item quantity="one">%1$d meter</item>
|
||||||
<item quantity="other">%1$d meters</item>
|
<item quantity="other">%1$d meters</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<string name="certsetup_installed_hint">If your car won\'t connect, it may reject this certificate. Import your own in Settings, under Certificate.</string>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<string name="cert_downloaded_footer">Car won\'t connect? Some cars from around 2020 on reject the aasdk certificate, so import your own instead. Changes take effect on the next connection.</string>
|
||||||
</resources>
|
</resources>
|
||||||
Reference in new issue
Block a user