summaryrefslogtreecommitdiffstats
path: root/wear_ui.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-09-02 00:26:31 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-09-02 00:26:31 +0200
commit8c753f62538b2008e726c66def9bf47aeed7afe1 (patch)
treefdfa7ce26b2e166187da4819ce1f88db8e640655 /wear_ui.cpp
parentMerge "wear_ui: Remove backgroundIcon." (diff)
parentwear_ui: Remove PrintOnScreenOnly() and PrintV(). (diff)
downloadandroid_bootable_recovery-8c753f62538b2008e726c66def9bf47aeed7afe1.tar
android_bootable_recovery-8c753f62538b2008e726c66def9bf47aeed7afe1.tar.gz
android_bootable_recovery-8c753f62538b2008e726c66def9bf47aeed7afe1.tar.bz2
android_bootable_recovery-8c753f62538b2008e726c66def9bf47aeed7afe1.tar.lz
android_bootable_recovery-8c753f62538b2008e726c66def9bf47aeed7afe1.tar.xz
android_bootable_recovery-8c753f62538b2008e726c66def9bf47aeed7afe1.tar.zst
android_bootable_recovery-8c753f62538b2008e726c66def9bf47aeed7afe1.zip
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp34
1 files changed, 1 insertions, 33 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index b9289d366..670050a0b 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -32,8 +32,8 @@
#include <vector>
#include <android-base/properties.h>
-#include <android-base/strings.h>
#include <android-base/stringprintf.h>
+#include <android-base/strings.h>
#include <minui/minui.h>
#include "common.h"
@@ -312,35 +312,3 @@ void WearRecoveryUI::ShowFile(const char* filename) {
ShowFile(fp);
fclose(fp);
}
-
-void WearRecoveryUI::PrintOnScreenOnly(const char *fmt, ...) {
- va_list ap;
- va_start(ap, fmt);
- PrintV(fmt, false, ap);
- va_end(ap);
-}
-
-void WearRecoveryUI::PrintV(const char* fmt, bool copy_to_stdout, va_list ap) {
- std::string str;
- android::base::StringAppendV(&str, fmt, ap);
-
- if (copy_to_stdout) {
- fputs(str.c_str(), stdout);
- }
-
- pthread_mutex_lock(&updateMutex);
- if (text_rows_ > 0 && text_cols_ > 0) {
- for (const char* ptr = str.c_str(); *ptr != '\0'; ++ptr) {
- if (*ptr == '\n' || text_col_ >= text_cols_) {
- text_[text_row_][text_col_] = '\0';
- text_col_ = 0;
- text_row_ = (text_row_ + 1) % text_rows_;
- if (text_row_ == text_top_) text_top_ = (text_top_ + 1) % text_rows_;
- }
- if (*ptr != '\n') text_[text_row_][text_col_++] = *ptr;
- }
- text_[text_row_][text_col_] = '\0';
- update_screen_locked();
- }
- pthread_mutex_unlock(&updateMutex);
-}