From 6da1f1937db356bda660d70b58b4f1702fbfb08a Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Wed, 14 Jan 2026 11:49:38 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3=E6=8B=A8=E5=8F=B7=E7=95=8C?= =?utf8?q?=E9=9D=A2=E6=8C=89=E9=94=AE=E7=9B=91=E5=90=AC=E6=81=AF=E5=B1=8F?= =?utf8?q?=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/phone/include/PhoneCallPresenter.h | 2 -- .../nativeui/phone/src/PhoneCallPresenter.cpp | 17 +---------------- .../nativeui/phone/src/PhoneCallView.cpp | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/include/PhoneCallPresenter.h b/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/include/PhoneCallPresenter.h index 66fc97493..4dd464f13 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/include/PhoneCallPresenter.h +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/include/PhoneCallPresenter.h @@ -22,9 +22,7 @@ namespace OHOS virtual ~PhoneCallPresenter(); void OnStart() override; - void OnPause() override; void OnResume() override; - void OnStop() override; void Invalidate(); void UpdatePhoneNumberView(const std::string &number); static PhoneCallPresenter *GetInstance(); diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/src/PhoneCallPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/src/PhoneCallPresenter.cpp index 3f7d003ac..7d90ee335 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/src/PhoneCallPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/src/PhoneCallPresenter.cpp @@ -43,26 +43,11 @@ namespace OHOS void PhoneCallPresenter::OnStart() { - - Presenter::OnStart(); - } - - void PhoneCallPresenter::OnPause(void) - { - - Presenter::OnPause(); } void PhoneCallPresenter::OnResume(void) { - - Presenter::OnResume(); - } - - void PhoneCallPresenter::OnStop(void) - { - - Presenter::OnStop(); + RootView::GetInstance()->SetOnKeyActListener(this); } bool PhoneCallPresenter::OnDrag(UIView &view, const DragEvent &event) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/src/PhoneCallView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/src/PhoneCallView.cpp index e16416ea5..0c7891421 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/src/PhoneCallView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/phone/src/PhoneCallView.cpp @@ -262,7 +262,7 @@ namespace OHOS Init(); // 增加按键监听 RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::PhoneCallPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::GetInstance()->SetOnKeyActListener(keyactListener); } -- 2.17.1