summaryrefslogtreecommitdiffstats
path: root/screen_ui.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-05-29 23:16:52 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-05-29 23:16:52 +0200
commit4fcc200272bfcb257df58a53f2cf6aac2c6dcbbd (patch)
tree04091e7f8b18e2a71094171af32115aea9555942 /screen_ui.h
parentMerge "updater: Add Commmand class to manage BBOTA commands." (diff)
parentMerge "ui: Use std::thread to create input/progress threads." (diff)
downloadandroid_bootable_recovery-4fcc200272bfcb257df58a53f2cf6aac2c6dcbbd.tar
android_bootable_recovery-4fcc200272bfcb257df58a53f2cf6aac2c6dcbbd.tar.gz
android_bootable_recovery-4fcc200272bfcb257df58a53f2cf6aac2c6dcbbd.tar.bz2
android_bootable_recovery-4fcc200272bfcb257df58a53f2cf6aac2c6dcbbd.tar.lz
android_bootable_recovery-4fcc200272bfcb257df58a53f2cf6aac2c6dcbbd.tar.xz
android_bootable_recovery-4fcc200272bfcb257df58a53f2cf6aac2c6dcbbd.tar.zst
android_bootable_recovery-4fcc200272bfcb257df58a53f2cf6aac2c6dcbbd.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;