From: luozheng <1732036298@qq.com> Date: Sat, 11 Oct 2025 03:13:45 +0000 (+0800) Subject: 屏蔽app list和主界面的切换动效 X-Git-Tag: V1.0.9_20251128_194606_LN~265^2~4 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=ccf5f080a8f973775b53a7ad7dc4a703698e6a78;p=mirrors%2FFD230.git 屏蔽app list和主界面的切换动效 --- diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/key/src/KeyInputListener.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/key/src/KeyInputListener.cpp index 85538519e..c7e6ec747 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/key/src/KeyInputListener.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/key/src/KeyInputListener.cpp @@ -35,7 +35,7 @@ void KeyInputListener::OnKeyPress(const KeyEvent &event) { pressFlag = 1; // 短按标志 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnKeyPress: pressFlag = %d", pressFlag); - #if 0 + #if 1 uint16_t currentViewId = NativeAbility::GetInstance().GetCurSliceId(); uint16 keyID = event.GetKeyId(); if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) @@ -67,7 +67,7 @@ void KeyInputListener::OnKeyRelease(const KeyEvent& event) { if (longPressFlag == 0 && pressFlag == 1) { - HandlePowerKeyPress(currentViewId); + // HandlePowerKeyPress(currentViewId); } } // 重置标志 @@ -85,7 +85,7 @@ void KeyInputListener::HandlePowerKeyPress(uint16_t currentViewId) { if (mcu_pms_is_screen_on()) { - NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN,TransitionType::TRANSITION_ZOOM); + NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN,TransitionType::TRANSITION_INVALID); } } else // 当前页面是主表盘 @@ -109,9 +109,9 @@ void KeyInputListener::HandlePowerKeyPress(uint16_t currentViewId) else { if (ApplistModel::GetInstance().GetCurrentStyle() == AppListStyle::WATERFALL_STYLE) { - NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_ENTER_WATERFALL); + NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_INVALID); } else { - NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_ZOOM); + NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_INVALID); } } }