diff options
author | Doug Zongker <dougz@android.com> | 2010-09-03 20:20:50 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-03 20:20:50 +0200 |
commit | 28cae98c834fb4bc47588b34dc3fe19811d5162b (patch) | |
tree | 0859a3b4fcf443a194f3c36c3ac48fc072ec5e20 | |
parent | am 532c8600: Revert 21f0f97ebabb47adcbfe8d38b02685f2019b4eb3 (diff) | |
parent | add --show_text option to recovery (diff) | |
download | android_bootable_recovery-28cae98c834fb4bc47588b34dc3fe19811d5162b.tar android_bootable_recovery-28cae98c834fb4bc47588b34dc3fe19811d5162b.tar.gz android_bootable_recovery-28cae98c834fb4bc47588b34dc3fe19811d5162b.tar.bz2 android_bootable_recovery-28cae98c834fb4bc47588b34dc3fe19811d5162b.tar.lz android_bootable_recovery-28cae98c834fb4bc47588b34dc3fe19811d5162b.tar.xz android_bootable_recovery-28cae98c834fb4bc47588b34dc3fe19811d5162b.tar.zst android_bootable_recovery-28cae98c834fb4bc47588b34dc3fe19811d5162b.zip |
Diffstat (limited to '')
-rw-r--r-- | common.h | 1 | ||||
-rw-r--r-- | recovery.c | 2 | ||||
-rw-r--r-- | ui.c | 8 |
3 files changed, 11 insertions, 0 deletions
@@ -26,6 +26,7 @@ void ui_init(); int ui_wait_key(); // waits for a key/button press, returns the code int ui_key_pressed(int key); // returns >0 if the code is currently pressed int ui_text_visible(); // returns >0 if text log is currently visible +void ui_show_text(int visible); void ui_clear_key_queue(); // Write a message to the on-screen log shown with Alt-L (also to stderr). diff --git a/recovery.c b/recovery.c index 04bf657d5..f8208ceca 100644 --- a/recovery.c +++ b/recovery.c @@ -45,6 +45,7 @@ static const struct option OPTIONS[] = { { "wipe_data", no_argument, NULL, 'w' }, { "wipe_cache", no_argument, NULL, 'c' }, { "set_encrypted_filesystems", required_argument, NULL, 'e' }, + { "show_text", no_argument, NULL, 't' }, { NULL, 0, NULL, 0 }, }; @@ -594,6 +595,7 @@ main(int argc, char **argv) { case 'w': wipe_data = wipe_cache = 1; break; case 'c': wipe_cache = 1; break; case 'e': encrypted_fs_mode = optarg; toggle_secure_fs = 1; break; + case 't': ui_show_text(1); break; case '?': LOGE("Invalid command argument\n"); continue; @@ -481,6 +481,14 @@ int ui_text_visible() return visible; } +void ui_show_text(int visible) +{ + pthread_mutex_lock(&gUpdateMutex); + show_text = visible; + update_screen_locked(); + pthread_mutex_unlock(&gUpdateMutex); +} + int ui_wait_key() { pthread_mutex_lock(&key_queue_mutex); |