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:
@@ -468,11 +468,14 @@ final class OtaUpdater {
|
||||
return InstallResult.SESSION_STARTED;
|
||||
} catch (Throwable t) {
|
||||
Log.w(TAG, "OTA session install failed; trying system install UI", t);
|
||||
UpdateLog.record(context, "Installer session failed: " + t);
|
||||
try {
|
||||
launchInstallerActivity(context, apk);
|
||||
UpdateLog.record(context, "Opened the system installer instead");
|
||||
return InstallResult.INSTALL_UI_STARTED;
|
||||
} catch (Throwable fallback) {
|
||||
Log.w(TAG, "OTA install UI failed", fallback);
|
||||
UpdateLog.record(context, "System installer failed too: " + fallback);
|
||||
return InstallResult.SESSION_FAILED;
|
||||
}
|
||||
}
|
||||
@@ -490,6 +493,8 @@ final class OtaUpdater {
|
||||
.getPackageArchiveInfo(apk.getAbsolutePath(), 0);
|
||||
if (info == null || info.packageName == null) {
|
||||
Log.w(TAG, "OTA archive cannot be parsed by the package manager");
|
||||
UpdateLog.record(context, "Package manager cannot parse " + apk.getName()
|
||||
+ " (" + apk.length() + " bytes)");
|
||||
return false;
|
||||
}
|
||||
if (!context.getPackageName().equals(info.packageName)) {
|
||||
@@ -533,6 +538,8 @@ final class OtaUpdater {
|
||||
// confirm, EXTRA_INTENT. An immutable PendingIntent would arrive empty.
|
||||
PendingIntent pending = PendingIntent.getBroadcast(context, sessionId, callback,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);
|
||||
// Written before commit: a successful install replaces this process at once.
|
||||
UpdateLog.record(context, "Handed " + apk.length() + " bytes to the installer");
|
||||
session.commit(pending.getIntentSender());
|
||||
committed = true;
|
||||
Log.i(TAG, "OTA session " + sessionId + " committed (" + apk.length() + " bytes)");
|
||||
|
||||
Reference in New Issue
Block a user