aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-08-26 09:56:44 -0500
committerTao Bao2017-08-26 10:17:36 -0500
commitcff8269e5c364ed48d4f3b81b7f67251ef73a81e (patch)
treea2baf7ee9b9b476c88854d680cddc3a0d22213e6 /wear_ui.cpp
parent571855b0e6e8046f19f4c623df22db1b6a6cdaee (diff)
downloadplatform-bootable-recovery-cff8269e5c364ed48d4f3b81b7f67251ef73a81e.tar.gz
platform-bootable-recovery-cff8269e5c364ed48d4f3b81b7f67251ef73a81e.tar.xz
platform-bootable-recovery-cff8269e5c364ed48d4f3b81b7f67251ef73a81e.zip
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 <pthread.h> for pthread_mutex_lock(). Test: lunch a watch target and `m recoveryimage`. Change-Id: I748cf4511434ac4ce97dddf89b0e42e68a5da04b
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index 169ef20e..75d01bdc 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -18,6 +18,7 @@
18 18
19#include <errno.h> 19#include <errno.h>
20#include <fcntl.h> 20#include <fcntl.h>
21#include <pthread.h>
21#include <stdarg.h> 22#include <stdarg.h>
22#include <stdlib.h> 23#include <stdlib.h>
23#include <string.h> 24#include <string.h>
@@ -38,11 +39,6 @@
38#include "common.h" 39#include "common.h"
39#include "device.h" 40#include "device.h"
40 41
41// There's only (at most) one of these objects, and global callbacks
42// (for pthread_create, and the input event system) need to find it,
43// so use a global variable.
44static WearRecoveryUI* self = NULL;
45
46// Return the current time as a double (including fractions of a second). 42// Return the current time as a double (including fractions of a second).
47static double now() { 43static double now() {
48 struct timeval tv; 44 struct timeval tv;
@@ -63,8 +59,6 @@ WearRecoveryUI::WearRecoveryUI()
63 touch_screen_allowed_ = true; 59 touch_screen_allowed_ = true;
64 60
65 for (size_t i = 0; i < 5; i++) backgroundIcon[i] = NULL; 61 for (size_t i = 0; i < 5; i++) backgroundIcon[i] = NULL;
66
67 self = this;
68} 62}
69 63
70int WearRecoveryUI::GetProgressBaseline() const { 64int WearRecoveryUI::GetProgressBaseline() const {