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