don't say "install complete" when it really isn't

Change the recovery UI so that when there is a hboot or radio update
pending (which the user most do a home+back reboot to actually
install), the UI tells them so, instead of saying "Install from sdcard
complete."
This commit is contained in:
Doug Zongker 2009-05-28 19:02:45 -07:00
parent 1c4ceae38f
commit 07e1dca706
4 changed files with 14 additions and 2 deletions

View File

@ -39,6 +39,10 @@ int remember_firmware_update(const char *type, const char *data, int length) {
return 0;
}
// Return true if there is a firmware update pending.
int firmware_update_pending() {
return update_data != NULL && update_length > 0;
}
/* Bootloader / Recovery Flow
*

View File

@ -23,6 +23,9 @@
*/
int remember_firmware_update(const char *type, const char *data, int length);
/* Returns true if a firmware update has been saved. */
int firmware_update_pending();
/* If an update was saved, reboot into the bootloader now to install it.
* Returns 0 if no radio image was defined, nonzero on error,
* doesn't return at all on success...

View File

@ -105,7 +105,7 @@ handle_update_script(ZipArchive *zip, const ZipEntry *update_script_entry)
return INSTALL_ERROR;
}
ui_print("Installation complete.\n");
LOGI("Installation complete.\n");
return INSTALL_SUCCESS;
}

View File

@ -375,7 +375,12 @@ prompt_and_wait()
} else if (!ui_text_visible()) {
return; // reboot if logs aren't visible
} else {
ui_print("Install from sdcard complete.\n");
if (firmware_update_pending()) {
ui_print("\nReboot via home+back or menu\n"
"to complete installation.\n");
} else {
ui_print("\nInstall from sdcard complete.\n");
}
}
break;
}