diff options
author | Doug Zongker <dougz@android.com> | 2009-06-24 18:36:20 +0200 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2009-06-24 18:36:20 +0200 |
commit | fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454 (patch) | |
tree | 458bbaf030872557aeea42b057383f246c5f6f75 /install.c | |
parent | add file_getprop() to updater (diff) | |
download | android_bootable_recovery-fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454.tar android_bootable_recovery-fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454.tar.gz android_bootable_recovery-fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454.tar.bz2 android_bootable_recovery-fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454.tar.lz android_bootable_recovery-fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454.tar.xz android_bootable_recovery-fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454.tar.zst android_bootable_recovery-fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454.zip |
Diffstat (limited to 'install.c')
-rw-r--r-- | install.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -210,7 +210,15 @@ try_update_binary(const char *path, ZipArchive *zip) { // progress bar. The program can write single-line commands: // // progress <frac> <secs> - // fill up <frac> of the progress bar over <secs> seconds. + // fill up the next <frac> part of of the progress bar + // over <secs> seconds. If <secs> is zero, use + // set_progress commands to manually control the + // progress of this segment of the bar + // + // set_progress <frac> + // <frac> should be between 0.0 and 1.0; sets the + // progress bar within the segment defined by the most + // recent progress command. // // firmware <"hboot"|"radio"> <filename> // arrange to install the contents of <filename> in the @@ -261,6 +269,10 @@ try_update_binary(const char *path, ZipArchive *zip) { ui_show_progress(fraction * (1-VERIFICATION_PROGRESS_FRACTION), seconds); + } else if (strcmp(command, "set_progress") == 0) { + char* fraction_s = strtok(NULL, " \n"); + float fraction = strtof(fraction_s, NULL); + ui_set_progress(fraction); } else if (strcmp(command, "firmware") == 0) { char* type = strtok(NULL, " \n"); char* filename = strtok(NULL, " \n"); |