Merge "ui: join only if joinable." am: 2454b2493a am: ccff03d196

am: b4aad37e21

Change-Id: I13bc78cf0209b586181b00bc13f642a2e68c3e3d
This commit is contained in:
Tao Bao
2018-06-06 13:17:39 -07:00
committed by android-build-merger
3 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -173,7 +173,9 @@ ScreenRecoveryUI::ScreenRecoveryUI(bool scrollable_menu)
ScreenRecoveryUI::~ScreenRecoveryUI() {
progress_thread_stopped_ = true;
progress_thread_.join();
if (progress_thread_.joinable()) {
progress_thread_.join();
}
}
GRSurface* ScreenRecoveryUI::GetCurrentFrame() const {
+5
View File
@@ -293,6 +293,11 @@ TEST_F(ScreenRecoveryUITest, Init) {
ASSERT_FALSE(ui_->WasTextEverVisible());
}
TEST_F(ScreenRecoveryUITest, dtor_NotCallingInit) {
ui_.reset();
ASSERT_FALSE(ui_);
}
TEST_F(ScreenRecoveryUITest, ShowText) {
ASSERT_TRUE(ui_->Init(kTestLocale));
ASSERT_FALSE(ui_->IsTextVisible());
+3 -1
View File
@@ -78,7 +78,9 @@ RecoveryUI::RecoveryUI()
RecoveryUI::~RecoveryUI() {
ev_exit();
input_thread_stopped_ = true;
input_thread_.join();
if (input_thread_.joinable()) {
input_thread_.join();
}
}
void RecoveryUI::OnKeyDetected(int key_code) {