From 0e00aee13b5c2a1047523c5f5e7ce521f5cc8bf6 Mon Sep 17 00:00:00 2001 From: liwang <965027894@qq.com> Date: Tue, 26 Aug 2025 13:47:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DopenNotificationSettings?= =?UTF-8?q?=E6=97=A0=E6=88=90=E5=8A=9F=E5=9B=9E=E8=B0=83=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liwang <965027894@qq.com> --- frameworks/ets/ani/src/manager/ani_open_settings.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frameworks/ets/ani/src/manager/ani_open_settings.cpp b/frameworks/ets/ani/src/manager/ani_open_settings.cpp index c88ff46b3..59fa8190a 100644 --- a/frameworks/ets/ani/src/manager/ani_open_settings.cpp +++ b/frameworks/ets/ani/src/manager/ani_open_settings.cpp @@ -248,6 +248,10 @@ void SettingsModalExtensionCallback::ProcessStatusChanged(int32_t code, bool isA ani_options aniArgs { 0, nullptr }; if (isAsync) { aniResult = vm_->AttachCurrentThread(&aniArgs, ANI_VERSION_1, &env); + if (aniResult != ANI_OK) { + ANS_LOGD("AttachCurrentThread fail. result: %{public}d.", aniResult); + aniResult = vm_->GetEnv(ANI_VERSION_1, &env); + } } else { aniResult = vm_->GetEnv(ANI_VERSION_1, &env); } -- Gitee