diff options
author | Tao Bao <tbao@google.com> | 2018-05-29 23:06:34 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-29 23:06:34 +0200 |
commit | b8634ca7935bfe2d1a6771424e0a44f7b23ce8a1 (patch) | |
tree | 04091e7f8b18e2a71094171af32115aea9555942 /screen_ui.h | |
parent | Merge "updater: Add Commmand class to manage BBOTA commands." (diff) | |
parent | ui: Use std::thread to create input/progress threads. (diff) | |
download | android_bootable_recovery-b8634ca7935bfe2d1a6771424e0a44f7b23ce8a1.tar android_bootable_recovery-b8634ca7935bfe2d1a6771424e0a44f7b23ce8a1.tar.gz android_bootable_recovery-b8634ca7935bfe2d1a6771424e0a44f7b23ce8a1.tar.bz2 android_bootable_recovery-b8634ca7935bfe2d1a6771424e0a44f7b23ce8a1.tar.lz android_bootable_recovery-b8634ca7935bfe2d1a6771424e0a44f7b23ce8a1.tar.xz android_bootable_recovery-b8634ca7935bfe2d1a6771424e0a44f7b23ce8a1.tar.zst android_bootable_recovery-b8634ca7935bfe2d1a6771424e0a44f7b23ce8a1.zip |
Diffstat (limited to 'screen_ui.h')
-rw-r--r-- | screen_ui.h | 6 |
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; |