diff --git a/frameworks/native/ability/native/recovery/app_recovery.cpp b/frameworks/native/ability/native/recovery/app_recovery.cpp index 4655b2f69a64688a149096f2a4993d262d91a6b7..59f15d8f5e6dc608942d387cac541f6e09a12c25 100644 --- a/frameworks/native/ability/native/recovery/app_recovery.cpp +++ b/frameworks/native/ability/native/recovery/app_recovery.cpp @@ -223,6 +223,11 @@ bool AppRecovery::ScheduleSaveAppState(StateReason reason, uintptr_t ability) return true; } + if (getpid() == gettid()) { + DoSaveAppState(reason); + return true; + } + auto handler = mainHandler_.lock(); if (handler == nullptr) { TAG_LOGE(AAFwkTag::RECOVERY, "null handler");