Merge "wear_ui: Remove PrintOnScreenOnly() and PrintV()." am: 8c753f6253
am: 0cada4da99

Change-Id: I49803c522f3f40a0ac8d70b5bf1eaf83a2c7d2f8
diff --git a/wear_ui.cpp b/wear_ui.cpp
index b9289d3..670050a 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 @@
   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);
-}
diff --git a/wear_ui.h b/wear_ui.h
index e97598b..92ef813 100644
--- a/wear_ui.h
+++ b/wear_ui.h
@@ -29,7 +29,6 @@
 
   // printing messages
   void Print(const char* fmt, ...) override;
-  void PrintOnScreenOnly(const char* fmt, ...) override __printflike(2, 3);
   void ShowFile(const char* filename) override;
   void ShowFile(FILE* fp) override;
 
@@ -50,8 +49,6 @@
 
   void update_progress_locked() override;
 
-  void PrintV(const char*, bool, va_list) override;
-
  private:
   void draw_background_locked() override;
   void draw_screen_locked() override;