summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2009-05-29 04:02:45 +0200
committerDoug Zongker <dougz@android.com>2009-05-29 04:02:45 +0200
commit07e1dca7068284c4f3013550335029eb72b39b82 (patch)
tree52685fc37135c50e0abf2518c8028f1f2d081919
parentundo temporary alignment hack (diff)
downloadandroid_bootable_recovery-07e1dca7068284c4f3013550335029eb72b39b82.tar
android_bootable_recovery-07e1dca7068284c4f3013550335029eb72b39b82.tar.gz
android_bootable_recovery-07e1dca7068284c4f3013550335029eb72b39b82.tar.bz2
android_bootable_recovery-07e1dca7068284c4f3013550335029eb72b39b82.tar.lz
android_bootable_recovery-07e1dca7068284c4f3013550335029eb72b39b82.tar.xz
android_bootable_recovery-07e1dca7068284c4f3013550335029eb72b39b82.tar.zst
android_bootable_recovery-07e1dca7068284c4f3013550335029eb72b39b82.zip
-rw-r--r--firmware.c4
-rw-r--r--firmware.h3
-rw-r--r--install.c2
-rw-r--r--recovery.c7
4 files changed, 14 insertions, 2 deletions
diff --git a/firmware.c b/firmware.c
index 34b291835..e2e4fe630 100644
--- a/firmware.c
+++ b/firmware.c
@@ -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
*
diff --git a/firmware.h b/firmware.h
index f3f7aab79..aeb8f97aa 100644
--- a/firmware.h
+++ b/firmware.h
@@ -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...
diff --git a/install.c b/install.c
index 4dcfe7536..e7db2a8f2 100644
--- a/install.c
+++ b/install.c
@@ -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;
}
diff --git a/recovery.c b/recovery.c
index a0bae97ca..e329db93d 100644
--- a/recovery.c
+++ b/recovery.c
@@ -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;
}