!3753 modify appRecovery not support app_freeze save

Merge pull request !3753 from zhancaijin/master
This commit is contained in:
openharmony_ci
2022-11-08 06:50:47 +00:00
committed by Gitee
2 changed files with 3 additions and 3 deletions
@@ -91,8 +91,8 @@ bool AppRecovery::ScheduleSaveAppState(StateReason reason)
}
if (reason == StateReason::APP_FREEZE) {
DoSaveAppState(reason);
return true;
HILOG_ERROR("ScheduleSaveAppState not support APP_FREEZE");
return false;
}
auto handler = mainHandler_.lock();
@@ -279,7 +279,7 @@ HWTEST_F(AppRecoveryUnitTest, ScheduleSaveAppState_003, TestSize.Level1)
AppRecovery::GetInstance().EnableAppRecovery(RestartFlag::ALWAYS_RESTART, SaveOccasionFlag::SAVE_WHEN_ERROR,
SaveModeFlag::SAVE_WITH_FILE);
bool ret = AppRecovery::GetInstance().ScheduleSaveAppState(StateReason::APP_FREEZE);
EXPECT_TRUE(ret);
EXPECT_FALSE(ret);
}
/**