aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-09-01 13:37:50 -0500
committerTao Bao2017-09-01 13:51:11 -0500
commitee8a96a581f60acfb92d507c9394bb6914606ee4 (patch)
treefdfa7ce26b2e166187da4819ce1f88db8e640655 /wear_ui.cpp
parent6e426f2b7615ddf3d004a4313954a144f0b9bad8 (diff)
downloadplatform-bootable-recovery-ee8a96a581f60acfb92d507c9394bb6914606ee4.tar.gz
platform-bootable-recovery-ee8a96a581f60acfb92d507c9394bb6914606ee4.tar.xz
platform-bootable-recovery-ee8a96a581f60acfb92d507c9394bb6914606ee4.zip
wear_ui: Remove PrintOnScreenOnly() and PrintV().
They're just copy/pastes from the base class (ScreenRecoveryUI). Test: mmma bootable/recovery Change-Id: I341416107a14d89d3366bba757da0b1abb988b15
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 b9289d36..670050a0 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -32,8 +32,8 @@
32#include <vector> 32#include <vector>
33 33
34#include <android-base/properties.h> 34#include <android-base/properties.h>
35#include <android-base/strings.h>
36#include <android-base/stringprintf.h> 35#include <android-base/stringprintf.h>
36#include <android-base/strings.h>
37#include <minui/minui.h> 37#include <minui/minui.h>
38 38
39#include "common.h" 39#include "common.h"
@@ -312,35 +312,3 @@ void WearRecoveryUI::ShowFile(const char* filename) {
312 ShowFile(fp); 312 ShowFile(fp);
313 fclose(fp); 313 fclose(fp);
314} 314}
315
316void WearRecoveryUI::PrintOnScreenOnly(const char *fmt, ...) {
317 va_list ap;
318 va_start(ap, fmt);
319 PrintV(fmt, false, ap);
320 va_end(ap);
321}
322
323void WearRecoveryUI::PrintV(const char* fmt, bool copy_to_stdout, va_list ap) {
324 std::string str;
325 android::base::StringAppendV(&str, fmt, ap);
326
327 if (copy_to_stdout) {
328 fputs(str.c_str(), stdout);
329 }
330
331 pthread_mutex_lock(&updateMutex);
332 if (text_rows_ > 0 && text_cols_ > 0) {
333 for (const char* ptr = str.c_str(); *ptr != '\0'; ++ptr) {
334 if (*ptr == '\n' || text_col_ >= text_cols_) {
335 text_[text_row_][text_col_] = '\0';
336 text_col_ = 0;
337 text_row_ = (text_row_ + 1) % text_rows_;
338 if (text_row_ == text_top_) text_top_ = (text_top_ + 1) % text_rows_;
339 }
340 if (*ptr != '\n') text_[text_row_][text_col_++] = *ptr;
341 }
342 text_[text_row_][text_col_] = '\0';
343 update_screen_locked();
344 }
345 pthread_mutex_unlock(&updateMutex);
346}