aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-09-03 11:23:21 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-03 11:23:21 -0700
commitb56db27d08c168a9167bf2226baaebf24a0fe5aa (patch)
tree77009b128a87b1a5d61413500b6cc6ed1f196c24
parent5200114fe8c1c1503176c891230200bf8d5ec632 (diff)
parent28cae98c834fb4bc47588b34dc3fe19811d5162b (diff)
downloadbootable_recovery-b56db27d08c168a9167bf2226baaebf24a0fe5aa.zip
bootable_recovery-b56db27d08c168a9167bf2226baaebf24a0fe5aa.tar.gz
bootable_recovery-b56db27d08c168a9167bf2226baaebf24a0fe5aa.tar.bz2
am 28cae98c: am 4bc98062: add --show_text option to recovery
Merge commit '28cae98c834fb4bc47588b34dc3fe19811d5162b' * commit '28cae98c834fb4bc47588b34dc3fe19811d5162b': add --show_text option to recovery
-rw-r--r--common.h1
-rw-r--r--recovery.c2
-rw-r--r--ui.c8
3 files changed, 11 insertions, 0 deletions
diff --git a/common.h b/common.h
index 333417f..0c250f4 100644
--- a/common.h
+++ b/common.h
@@ -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 40e79d7..779e77d 100644
--- a/recovery.c
+++ b/recovery.c
@@ -46,6 +46,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 },
};
@@ -718,6 +719,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;
diff --git a/ui.c b/ui.c
index ee6a0c5..84a9b85 100644
--- a/ui.c
+++ b/ui.c
@@ -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);