am 07e1dca7: don\'t say "install complete" when it really isn\'t

Merge commit '07e1dca7068284c4f3013550335029eb72b39b82'

* commit '07e1dca7068284c4f3013550335029eb72b39b82':
  don't say "install complete" when it really isn't
This commit is contained in:
Doug Zongker 2009-06-01 14:35:16 -07:00 committed by The Android Open Source Project
commit 9d5be8488f
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;
}