From 12d5ab9914b818eb3f6e42eb80b15a5f7d3f3cdf Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Sat, 21 Sep 2024 10:30:28 +0800 Subject: [PATCH] =?utf8?q?=E7=94=B5=E8=AF=9Dbug=E7=BB=BC=E5=90=88=E4=BF=AE?= =?utf8?q?=E5=A4=8D(=E8=A1=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/makephone/src/MainCallingView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingView.cpp index 0ac5cdf46..feb2ef553 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingView.cpp @@ -33,6 +33,7 @@ MainCallingView::~MainCallingView() delete waitingView; waitingView = nullptr; + g_pMainView = nullptr; } @@ -135,6 +136,7 @@ void MainCallingView::OnStart() if (InitPointerValue() == false) { return; } + RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::MainCallingPresenter::GetInstance(); RootView::GetInstance()->SetOnKeyActListener(keyactListener); @@ -185,6 +187,8 @@ void MainCallingView::OnStop() WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingView::~OnStop"); View::OnStop(); RootView::GetInstance()->RemoveAll(); + RootView::GetInstance()->ClearOnKeyActListener(); + return; } } \ No newline at end of file -- 2.17.1