summaryrefslogtreecommitdiffstats
path: root/screen_ui.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-05-10 01:32:02 +0200
committerJerry Zhang <zhangjerry@google.com>2018-05-22 01:37:07 +0200
commit26ea9591bcb90c5ac201fce7ce2f0e1e092c703e (patch)
tree81c9c2816f8023a2477a07266a5b075afaa0033f /screen_ui.h
parentrecovery: Add ability to set title lines (diff)
downloadandroid_bootable_recovery-26ea9591bcb90c5ac201fce7ce2f0e1e092c703e.tar
android_bootable_recovery-26ea9591bcb90c5ac201fce7ce2f0e1e092c703e.tar.gz
android_bootable_recovery-26ea9591bcb90c5ac201fce7ce2f0e1e092c703e.tar.bz2
android_bootable_recovery-26ea9591bcb90c5ac201fce7ce2f0e1e092c703e.tar.lz
android_bootable_recovery-26ea9591bcb90c5ac201fce7ce2f0e1e092c703e.tar.xz
android_bootable_recovery-26ea9591bcb90c5ac201fce7ce2f0e1e092c703e.tar.zst
android_bootable_recovery-26ea9591bcb90c5ac201fce7ce2f0e1e092c703e.zip
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/screen_ui.h b/screen_ui.h
index c90a2cd17..c3605161a 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -20,9 +20,11 @@
#include <pthread.h>
#include <stdio.h>
+#include <atomic>
#include <functional>
#include <memory>
#include <string>
+#include <thread>
#include <vector>
#include "ui.h"
@@ -112,6 +114,7 @@ class ScreenRecoveryUI : public RecoveryUI {
ScreenRecoveryUI();
explicit ScreenRecoveryUI(bool scrollable_menu);
+ ~ScreenRecoveryUI() override;
bool Init(const std::string& locale) override;
std::string GetLocale() const override;
@@ -275,7 +278,8 @@ class ScreenRecoveryUI : public RecoveryUI {
// An alternate text screen, swapped with 'text_' when we're viewing a log file.
char** file_viewer_text_;
- pthread_t progress_thread_;
+ std::thread progress_thread_;
+ std::atomic<bool> progress_thread_stopped_{ false };
// Number of intro frames and loop frames in the animation.
size_t intro_frames;