summaryrefslogtreecommitdiffstats
path: root/install.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2014-05-23 17:40:35 +0200
committerDoug Zongker <dougz@android.com>2014-05-23 17:52:31 +0200
commitc704e06ce596bd0a6de66b10b108aee95535468a (patch)
tree3005b89333b7500aaa78e0867e377eac2f0280ab /install.cpp
parentam 502e4595: am d1c64060: am 5fbb729f: Merge "exit instead of return if sideload file creation fails" (diff)
downloadandroid_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.gz
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.bz2
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.lz
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.xz
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.tar.zst
android_bootable_recovery-c704e06ce596bd0a6de66b10b108aee95535468a.zip
Diffstat (limited to 'install.cpp')
-rw-r--r--install.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/install.cpp b/install.cpp
index 0bd7945c4..0f059602a 100644
--- a/install.cpp
+++ b/install.cpp
@@ -160,6 +160,11 @@ try_update_binary(const char *path, ZipArchive *zip, int* wipe_cache) {
*wipe_cache = 1;
} else if (strcmp(command, "clear_display") == 0) {
ui->SetBackground(RecoveryUI::NONE);
+ } else if (strcmp(command, "enable_reboot") == 0) {
+ // packages can explicitly request that they want the user
+ // to be able to reboot during installation (useful for
+ // debugging packages that don't exit).
+ ui->SetEnableReboot(true);
} else {
LOGE("unknown command [%s]\n", command);
}
@@ -236,7 +241,9 @@ really_install_package(const char *path, int* wipe_cache)
/* Verify and install the contents of the package.
*/
ui->Print("Installing update...\n");
+ ui->SetEnableReboot(false);
int result = try_update_binary(path, &zip, wipe_cache);
+ ui->SetEnableReboot(true);
sysReleaseMap(&map);