From ad839dc6d819b6163d703693bc7af8ef8427d4dd Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Fri, 16 Jan 2026 18:21:32 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E9=87=8D=E7=82=B9=E5=BC=B9?= =?utf8?q?=E7=AA=97=E9=A1=B5=E9=9D=A2=E6=8C=89=E9=94=AE=E9=80=80=E5=87=BA?= =?utf8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../msg_center/src/notify/charge_notification.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/charge_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/charge_notification.cpp index b33c2d824..aa8edc0d2 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/charge_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/charge_notification.cpp @@ -663,7 +663,14 @@ namespace OHOS bool lowppowrViewEventListener::OnKeyAct(UIView &view, const KeyEvent &event) { - NotificationManager::GetInstance()->StopNotify(); + unsigned short keyID = event.GetKeyId(); + unsigned short keyState = event.GetState(); + + // 如果是power键,且是亮屏状态,按键释放就返回上一级 + if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER) && keyState == 1 && uapi_get_screen_state() == 0) + { + NotificationManager::GetInstance()->StopNotify(); + } return true; } -- 2.17.1