From d6839185f2333dd865b40841a159341f5f90ea78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=85=B4=E6=AD=A6?= <951620110@qq.com> Date: Mon, 9 Jun 2025 11:35:44 +0000 Subject: [PATCH] =?UTF-8?q?Crash=E5=9C=BA=E6=99=AF=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=88=A4=E6=96=ADpid=20=3D=3D=20tid=E4=BD=BF=E8=83=BDsavestate?= =?UTF-8?q?=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郭兴武 <951620110@qq.com> --- frameworks/native/ability/native/recovery/app_recovery.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frameworks/native/ability/native/recovery/app_recovery.cpp b/frameworks/native/ability/native/recovery/app_recovery.cpp index 4655b2f69a6..59f15d8f5e6 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"); -- Gitee