From 068383835e639c1f8d6b30544131e3af58099442 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 3 Aug 2024 20:31:00 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3=E8=8E=AB=E5=90=8D=E5=A5=87?= =?utf8?q?=E5=A6=99=E8=BF=9B=E5=85=A5=E8=AF=AD=E8=A8=80=E7=95=8C=E9=9D=A2?= =?utf8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E6=89=8B=E8=A1=A8=E5=90=8D=E7=A7=B0?= =?utf8?q?=E6=94=B9=E4=B8=BAKUMI=20WATCH=20Soar?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/fd230app/nativeui/applist/include/ApplistView.h | 1 - .../wearable/fd230app/nativeui/key/src/KeyInputListener.cpp | 5 ++--- .../nativeui/languagecode/src/LanguageSwitchPresenter.cpp | 3 ++- .../rebootandshutdown/src/RebootAndShutdownModel.cpp | 3 ++- .../fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp | 2 +- .../application/wearable/nativeabilityfwk/include/Ability.h | 1 - .../application/wearable/nativeabilityfwk/src/Ability.cpp | 5 +++++ .../wearable/service/ble_service/bleservice/bleService.h | 2 +- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/applist/include/ApplistView.h b/code/sdk/application/wearable/fd230app/nativeui/applist/include/ApplistView.h index fcfe2b99c..b5a238853 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/applist/include/ApplistView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/applist/include/ApplistView.h @@ -47,7 +47,6 @@ public: if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Applist Ondrag!!"); - NativeAbility::GetInstance().ClearSliceIdStack();/*凡是回到主界面都要清空栈*/ NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN, TransitionType::TRANSITION_ZOOM); } 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 19835ba2e..c6163d9d7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/key/src/KeyInputListener.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/key/src/KeyInputListener.cpp @@ -135,7 +135,6 @@ void KeyInputListener::CallVolumeDipSwitchControl(VolumeChangeStatus status) if (mcu_pms_is_screen_on()) { PressAlarmNotify(); - NativeAbility::GetInstance().ClearSliceIdStack(); NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN, TransitionType::TRANSITION_ZOOM); } } @@ -150,8 +149,8 @@ void KeyInputListener::CallVolumeDipSwitchControl(VolumeChangeStatus status) } else { - // NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_ZOOM); - NativeAbility::GetInstance().EnterSlice(VIEW_APPLIST, TransitionType::TRANSITION_ZOOM); + NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_ZOOM); + // NativeAbility::GetInstance().EnterSlice(VIEW_APPLIST, TransitionType::TRANSITION_ZOOM); } } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/languagecode/src/LanguageSwitchPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/languagecode/src/LanguageSwitchPresenter.cpp index c7baeb376..711f3a99b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/languagecode/src/LanguageSwitchPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/languagecode/src/LanguageSwitchPresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-28 14:17:43 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-07-22 19:03:52 + * @LastEditTime: 2024-08-03 20:21:27 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/languagecode/src/LanguageSwitchPresenter.cpp */ #include "AppViewIDs.h" @@ -106,6 +106,7 @@ namespace OHOS uapi_set_screen_on_api(); NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN); ConfigModel::GetInstance()->SetisFirstTimeStart(false); + NativeAbility::GetInstance().SetDefaultSliceId(VIEW_MAIN); } } /* -------------------------------------------------------------------------- */ diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp index f7b09191d..70c4868e4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-07-18 14:55:27 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-03 17:53:50 + * @LastEditTime: 2024-08-03 20:21:43 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp */ @@ -40,6 +40,7 @@ namespace OHOS uapi_set_screen_on_api(); NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN); ConfigModel::GetInstance()->SetisFirstTimeStart(false); + NativeAbility::GetInstance().SetDefaultSliceId(VIEW_MAIN); } } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp index cab3d82b4..15abc8c48 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemAboutTheWatchView.cpp @@ -246,7 +246,7 @@ namespace OHOS #ifdef CUSTOM_Z1 .text = "Z1", #else - .text = "Watch Soar", + .text = "KUMI WATCH Soar", #endif .lineBreakMode = UILabel::LINE_BREAK_WRAP, }; diff --git a/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h b/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h index 1dd83f5e5..3a5c635a5 100755 --- a/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h +++ b/code/sdk/application/wearable/nativeabilityfwk/include/Ability.h @@ -149,7 +149,6 @@ public: } } - /*打印栈中元素*/ /*打印栈中元素*/ void showsStackSliceId() { diff --git a/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp b/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp index 6b187dbe2..e811e93e6 100755 --- a/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp +++ b/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp @@ -20,6 +20,7 @@ #include "dock/focus_manager.h" #include #include "BaseView.h" +#include "AppViewIDs.h" namespace OHOS { /* * @brief 负责将一个SliceProxy对象添加到Ability对象中,如果传入的sliceId是无效的或者代理对象proxy为空,则不执行任何操作。 @@ -118,6 +119,10 @@ ListsNode* Ability::Find(const uint16_t sliceId) */ void Ability::ChangeSlice(const uint16_t targetSliceId, TransitionType type, const uint16_t priority) { + if(targetSliceId == VIEW_MAIN) + { + ClearSliceIdStack();/*凡是回到主界面都要清空栈*/ + } // showsStackSliceId(); /* if (GetCurSliceId() == targetSliceId) { diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h index 6bcfa2b7d..3a573813e 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.h @@ -31,7 +31,7 @@ extern uint16_t g_ble_server_handle; #ifdef CUSTOM_Z1 #define BLE_DEFAULT_NAME "Z1"//"KUMI U6" #else -#define BLE_DEFAULT_NAME "WatchSoar"//"KUMI U6" +#define BLE_DEFAULT_NAME "WATCHSoar"//"KUMI U6" #endif void svr_ble_bluetooth_init(void);//蓝牙服务初始化 void custom_ble_service_stop(void);//主动关闭蓝牙 -- 2.17.1