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:
@@ -39,6 +39,10 @@ int remember_firmware_update(const char *type, const char *data, int length) {
|
|||||||
return 0;
|
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
|
/* Bootloader / Recovery Flow
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
*/
|
*/
|
||||||
int remember_firmware_update(const char *type, const char *data, int length);
|
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.
|
/* If an update was saved, reboot into the bootloader now to install it.
|
||||||
* Returns 0 if no radio image was defined, nonzero on error,
|
* Returns 0 if no radio image was defined, nonzero on error,
|
||||||
* doesn't return at all on success...
|
* doesn't return at all on success...
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ handle_update_script(ZipArchive *zip, const ZipEntry *update_script_entry)
|
|||||||
return INSTALL_ERROR;
|
return INSTALL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_print("Installation complete.\n");
|
LOGI("Installation complete.\n");
|
||||||
return INSTALL_SUCCESS;
|
return INSTALL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -375,7 +375,12 @@ prompt_and_wait()
|
|||||||
} else if (!ui_text_visible()) {
|
} else if (!ui_text_visible()) {
|
||||||
return; // reboot if logs aren't visible
|
return; // reboot if logs aren't visible
|
||||||
} else {
|
} 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user