Merge "ui: join only if joinable."
am: 2454b2493a
Change-Id: I84d7bb6be8dbf35d0161237902a7b7e076200e10
This commit is contained in:
+3
-1
@@ -173,7 +173,9 @@ ScreenRecoveryUI::ScreenRecoveryUI(bool scrollable_menu)
|
|||||||
|
|
||||||
ScreenRecoveryUI::~ScreenRecoveryUI() {
|
ScreenRecoveryUI::~ScreenRecoveryUI() {
|
||||||
progress_thread_stopped_ = true;
|
progress_thread_stopped_ = true;
|
||||||
progress_thread_.join();
|
if (progress_thread_.joinable()) {
|
||||||
|
progress_thread_.join();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GRSurface* ScreenRecoveryUI::GetCurrentFrame() const {
|
GRSurface* ScreenRecoveryUI::GetCurrentFrame() const {
|
||||||
|
|||||||
@@ -293,6 +293,11 @@ TEST_F(ScreenRecoveryUITest, Init) {
|
|||||||
ASSERT_FALSE(ui_->WasTextEverVisible());
|
ASSERT_FALSE(ui_->WasTextEverVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(ScreenRecoveryUITest, dtor_NotCallingInit) {
|
||||||
|
ui_.reset();
|
||||||
|
ASSERT_FALSE(ui_);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(ScreenRecoveryUITest, ShowText) {
|
TEST_F(ScreenRecoveryUITest, ShowText) {
|
||||||
ASSERT_TRUE(ui_->Init(kTestLocale));
|
ASSERT_TRUE(ui_->Init(kTestLocale));
|
||||||
ASSERT_FALSE(ui_->IsTextVisible());
|
ASSERT_FALSE(ui_->IsTextVisible());
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ RecoveryUI::RecoveryUI()
|
|||||||
RecoveryUI::~RecoveryUI() {
|
RecoveryUI::~RecoveryUI() {
|
||||||
ev_exit();
|
ev_exit();
|
||||||
input_thread_stopped_ = true;
|
input_thread_stopped_ = true;
|
||||||
input_thread_.join();
|
if (input_thread_.joinable()) {
|
||||||
|
input_thread_.join();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RecoveryUI::OnKeyDetected(int key_code) {
|
void RecoveryUI::OnKeyDetected(int key_code) {
|
||||||
|
|||||||
Reference in New Issue
Block a user