summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorTom Marshall <tdm@cyngn.com>2015-02-03 09:56:57 -0800
committerTom Marshall <tdm@cyngn.com>2015-11-25 15:35:47 -0800
commitf028ccd3443a4526c245c8c664b37588be301eb2 (patch)
tree6608d58a19aa2821157b01b8754a8805a12ba7dd /screen_ui.cpp
parentd644eb58fde7d39a416850af3caeb4cbce514ec8 (diff)
downloadbootable_recovery-f028ccd3443a4526c245c8c664b37588be301eb2.zip
bootable_recovery-f028ccd3443a4526c245c8c664b37588be301eb2.tar.gz
bootable_recovery-f028ccd3443a4526c245c8c664b37588be301eb2.tar.bz2
recovery: Headless mode
Change-Id: I6b54bde65264aee99cb51a19436e82054b31fe74
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index aef714b..992210b 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -282,6 +282,9 @@ void ScreenRecoveryUI::draw_dialog()
}
else {
draw_background_locked(dialog_icon);
+ if (dialog_icon == HEADLESS) {
+ return;
+ }
}
draw_header_icon();
@@ -522,6 +525,7 @@ void ScreenRecoveryUI::Init() {
LoadBitmap("icon_info", &backgroundIcon[D_INFO]);
LoadBitmap("icon_error", &backgroundIcon[D_ERROR]);
backgroundIcon[NO_COMMAND] = backgroundIcon[D_ERROR];
+ LoadBitmap("icon_headless", &backgroundIcon[HEADLESS]);
LoadBitmap("progress_empty", &progressBarEmpty);
LoadBitmap("progress_fill", &progressBarFill);
@@ -802,6 +806,17 @@ void ScreenRecoveryUI::DialogDismiss()
pthread_mutex_unlock(&updateMutex);
}
+void ScreenRecoveryUI::SetHeadlessMode()
+{
+ pthread_mutex_lock(&updateMutex);
+ free(dialog_text);
+ dialog_text = strdup("");
+ dialog_show_log = false;
+ dialog_icon = HEADLESS;
+ update_screen_locked();
+ pthread_mutex_unlock(&updateMutex);
+}
+
void ScreenRecoveryUI::StartMenu(const char* const * headers, const char* const * items,
int initial_selection) {
pthread_mutex_lock(&updateMutex);