From ed031bc1a2c1b8c9c972e10419bc40b8098ef48b Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Fri, 30 Aug 2024 19:49:08 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=9D=E7=95=99=E9=80=9A=E8=AF=9D=E6=8C=89?= =?utf8?q?=E9=94=AE=E8=B0=83=E8=8A=82=E9=9F=B3=E9=87=8F=E5=8A=9F=E8=83=BD?= =?utf8?q?=EF=BC=8C=E5=8A=A0=E5=A4=A7=E6=9D=A1=E4=BB=B6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/key/src/KeyInputListener.cpp | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/key/src/KeyInputListener.cpp b/code/sdk/application/wearable/fd230app/nativeui/key/src/KeyInputListener.cpp index 23472dc97..e50434dea 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/key/src/KeyInputListener.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/key/src/KeyInputListener.cpp @@ -139,15 +139,17 @@ namespace OHOS // 短按电源键 if (longPressFlag == 0 && pressFlag == 1) { -#if 0 +#if 1 // 如果当前页面是音量卡片或正在通话中,则执行音量+操作 - if (currentViewId == VIEW_INCOMING_CALL || - NotificationManager::GetInstance()->GetWatchCallStatus()) + if (currentViewId == VIEW_INCOMING_CALL ) +#else + || NotificationManager::GetInstance()->GetWatchCallStatus()) +#endif { // 音量卡片 // 音量 CallVolumeDipSwitchControl(VOLUMEUP); } -#endif + if (currentViewId != VIEW_MAIN) // 如果当前页面不是主表盘,如果屏幕亮起,则先处理闹钟通知再切换到主表盘页面 { if (mcu_pms_is_screen_on()) @@ -194,15 +196,17 @@ namespace OHOS // 检查是否是短按功能键 if (longPressFlag == 0 && pressFlag == 1) { -#if 0 - // 如果当前页面是音量卡片或正在通话中,则执行音量减操作 - if (currentViewId == VIEW_INCOMING_CALL || - NotificationManager::GetInstance()->GetWatchCallStatus()) +#if 1 + // 如果当前页面是音量卡片或正在通话中,则执行音量+操作 + if (currentViewId == VIEW_INCOMING_CALL ) +#else + || NotificationManager::GetInstance()->GetWatchCallStatus()) +#endif { // 音量卡片 // 音量- CallVolumeDipSwitchControl(VOLUMEDOWN); } -#endif + if (currentViewId != VIEW_MAIN) // 如果当前页面不是主表盘,如果屏幕亮起,则先处理闹钟通知再切换到主表盘页面。 { if (mcu_pms_is_screen_on()) -- 2.17.1