From d428e791393399d85bfddf76f6a69814264d6a1c Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Thu, 13 Jul 2017 18:17:35 -0700 Subject: Add libasyncio. libadbd_usb depends on libasyncio. Bug: 37916658 Test: Use adb in recovery on bullhead/marlin Change-Id: I77ac3bb2a580d29551e7b5c471bc3cfbf1a3219d --- Android.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Android.mk b/Android.mk index dc066dd48..c35dabc2d 100644 --- a/Android.mk +++ b/Android.mk @@ -127,6 +127,7 @@ LOCAL_STATIC_LIBRARIES := \ libmounts \ libz \ libminadbd \ + libasyncio \ libfusesideload \ libminui \ libpng \ -- cgit v1.2.3 From cff8269e5c364ed48d4f3b81b7f67251ef73a81e Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 26 Aug 2017 07:56:44 -0700 Subject: wear_ui: Remove dead 'self' and 'progress_t'. They were once used for progress_thread() that's pthread_create'd by WearRecoveryUI::Init(). They have become dead since the removal of progress_thread() (commit ad8b5a6c1195b94d8d80671e1bf791c32008fbef). Also add the missing include of for pthread_mutex_lock(). Test: lunch a watch target and `m recoveryimage`. Change-Id: I748cf4511434ac4ce97dddf89b0e42e68a5da04b --- wear_ui.cpp | 8 +------- wear_ui.h | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/wear_ui.cpp b/wear_ui.cpp index 169ef20e1..75d01bdc3 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -38,11 +39,6 @@ #include "common.h" #include "device.h" -// There's only (at most) one of these objects, and global callbacks -// (for pthread_create, and the input event system) need to find it, -// so use a global variable. -static WearRecoveryUI* self = NULL; - // Return the current time as a double (including fractions of a second). static double now() { struct timeval tv; @@ -63,8 +59,6 @@ WearRecoveryUI::WearRecoveryUI() touch_screen_allowed_ = true; for (size_t i = 0; i < 5; i++) backgroundIcon[i] = NULL; - - self = this; } int WearRecoveryUI::GetProgressBaseline() const { diff --git a/wear_ui.h b/wear_ui.h index 3bd90b699..d04718ccf 100644 --- a/wear_ui.h +++ b/wear_ui.h @@ -68,8 +68,6 @@ class WearRecoveryUI : public ScreenRecoveryUI { const char* const* menu_headers_; int menu_start, menu_end; - pthread_t progress_t; - void draw_background_locked() override; void draw_screen_locked() override; -- cgit v1.2.3 From 1e27d14eea7c11eb099e0e05dd0e26a49f21a13b Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 26 Aug 2017 08:32:29 -0700 Subject: wear_ui: Remove kMaxCols/kMaxRows/visible_text_rows/menu_headers_. We've deprecated kMaxCols/kMaxRows in ScreenRecoveryUI since commit aa0d6afb61f4cf928e87c7a21bcb59fc973f15a0. They unnecessarily limit the screen size to 96x96 characters. Also remove the recomputations of text_cols, visible_text_rows (which is the same as text_rows_). Remove the unintentional hiding of menu_headers_. Test: mmma bootable/recovery Change-Id: I7d1526b651943312d62d52cd200414b42bf9b12a --- wear_ui.cpp | 16 +--------------- wear_ui.h | 9 --------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/wear_ui.cpp b/wear_ui.cpp index 169ef20e1..71a535199 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -191,20 +191,6 @@ void WearRecoveryUI::update_progress_locked() { gr_flip(); } -bool WearRecoveryUI::InitTextParams() { - if (!ScreenRecoveryUI::InitTextParams()) { - return false; - } - - text_cols_ = (gr_fb_width() - (kMarginWidth * 2)) / char_width_; - - if (text_rows_ > kMaxRows) text_rows_ = kMaxRows; - if (text_cols_ > kMaxCols) text_cols_ = kMaxCols; - - visible_text_rows = (gr_fb_height() - (kMarginHeight * 2)) / char_height_; - return true; -} - bool WearRecoveryUI::Init(const std::string& locale) { if (!ScreenRecoveryUI::Init(locale)) { return false; @@ -269,7 +255,7 @@ void WearRecoveryUI::StartMenu(const char* const* headers, const char* const* it show_menu = true; menu_sel = initial_selection; menu_start = 0; - menu_end = visible_text_rows - 1 - kMenuUnusableRows; + menu_end = text_rows_ - 1 - kMenuUnusableRows; if (menu_items <= menu_end) menu_end = menu_items; update_screen_locked(); } diff --git a/wear_ui.h b/wear_ui.h index 3bd90b699..2c5b7e481 100644 --- a/wear_ui.h +++ b/wear_ui.h @@ -50,8 +50,6 @@ class WearRecoveryUI : public ScreenRecoveryUI { int GetProgressBaseline() const override; - bool InitTextParams() override; - void update_progress_locked() override; void PrintV(const char*, bool, va_list) override; @@ -59,13 +57,6 @@ class WearRecoveryUI : public ScreenRecoveryUI { private: GRSurface* backgroundIcon[5]; - static const int kMaxCols = 96; - static const int kMaxRows = 96; - - // Number of text rows seen on screen - int visible_text_rows; - - const char* const* menu_headers_; int menu_start, menu_end; pthread_t progress_t; -- cgit v1.2.3