App 2.19.3: update log on the Logs tab

Every update and install step, with the platform's own result, kept
across the restart an install causes, so a failed install on the car
can be read off the screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
2026-10-23 21:15:44 +02:00
co-authored by Claude Opus 5.5
parent 50217aef74
commit 51beea5ed8
11 changed files with 147 additions and 7 deletions
@@ -285,6 +285,7 @@ public class MainActivity extends AppCompatActivity {
panes = new View[] { vehiclePane, consumptionPane, chargingPane, servicePane, serverPane,
settingsPane, logPane };
UpdateLog.noteVersion(this, BuildConfig.VERSION_NAME);
bindVehiclePane();
bindConsumptionPane();
bindChargingPane();
@@ -1792,13 +1793,21 @@ public class MainActivity extends AppCompatActivity {
private void refreshCallLog() {
java.util.List<UploadLog.Entry> entries = AbrpUploadService.log().recent();
// Update steps first: after a failed install, they are what the driver came here for.
java.util.List<String> updates = UpdateLog.lines(this);
StringBuilder sb = new StringBuilder();
if (!updates.isEmpty()) {
sb.append(getString(R.string.update_log_title));
for (String line : updates) sb.append('\n').append(line);
sb.append('\n');
}
if (entries.isEmpty()) {
callLogText.setText(R.string.call_log_empty);
if (sb.length() == 0) callLogText.setText(R.string.call_log_empty);
else callLogText.setText(sb.append('\n').append(getString(R.string.call_log_empty)).toString());
return;
}
java.text.SimpleDateFormat format =
new java.text.SimpleDateFormat("HH:mm:ss", java.util.Locale.US);
StringBuilder sb = new StringBuilder();
for (UploadLog.Entry entry : entries) {
if (sb.length() > 0) sb.append('\n');
sb.append(entry.success ? "OK " : "ERR ")