解决patch1201合并死机问题 3362/2 3362/head 3365/target/1
authorluozheng <1732036298@qq.com>
Thu, 23 Apr 2026 08:24:04 +0000 (16:24 +0800)
committerluozheng <1732036298@qq.com>
Thu, 23 Apr 2026 08:24:04 +0000 (16:24 +0800)
141 files changed:
code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd230/libuikit_fwk.a [deleted file]
code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd230_user/libuikit_fwk.a [deleted file]
code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd272/libuikit_fwk.a [deleted file]
code/sdk/application/wearable/evb/nativeapp/brandy-native-js-ln/libuikit_fwk.a [deleted file]
code/sdk/application/wearable/evb/nativeapp/brandy-native-js-lnppp/libuikit_fwk.a [deleted file]
code/sdk/application/wearable/evb/nativeapp/brandy-native-js-n9/libuikit_fwk.a
code/sdk/application/wearable/evb/nativeapp/brandy-native-js-n9ln/libuikit_fwk.a [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportCountdownPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportDataPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportHeartRateRangeItemView.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportHeartRateRangePage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMenuItemView.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMenuPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMistouchPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportModel.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPausePage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPreparePage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPresenter.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPromptPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindHeartRateItemView.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindHeartRatePage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindIntervalItemView.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindIntervalPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindItemView.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportSettingsItemView.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportSettingsPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetItemView.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetPromptPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetSettingPage.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportView.h [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportCountdownPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportDataPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportHeartRateRangeItemView.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportHeartRateRangePage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMenuItemView.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMenuPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMistouchPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportModel.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPausePage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPreparePage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPresenter.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPromptPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindHeartRateItemView.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindHeartRatePage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindIntervalItemView.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindIntervalPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindItemView.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportSettingsItemView.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportSettingsPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetItemView.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetPromptPage.cpp [deleted file]
code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetSettingPage.cpp [deleted file]
code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd230/libmsg_center.a [deleted file]
code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd230_user/libmsg_center.a [deleted file]
code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd272/libmsg_center.a [deleted file]
code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-ln/libmsg_center.a [deleted file]
code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-lnppp/libmsg_center.a [deleted file]
code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-n9/libmsg_center.a
code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-n9ln/libmsg_center.a [deleted file]
code/sdk/application/wearable/n9/nativeabilityfwk/src/AbilitySlice.cpp
code/sdk/application/wearable/n9/nativeapp/brandy-native-js-fd230/libuikit_fwk.a [deleted file]
code/sdk/application/wearable/n9/nativeapp/brandy-native-js-n9/libuikit_fwk.a
code/sdk/application/wearable/n9/nativeapp/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/languagecode/src/LanguageSwitchPresenter.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootDeviceView.h [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootModel.h [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootPresenter.h [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootView.h [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/ShutdownDeviceView.h [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootDeviceView.cpp [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootModel.cpp [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootPresenter.cpp [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootView.cpp [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/ShutdownDeviceView.cpp [deleted file]
code/sdk/application/wearable/n9/nativeapp/nativeui/set_dial_style/src/SetDialStyleView.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/set_time_format/src/SetTimeFormatView.cpp
code/sdk/drivers/chips/brandy/clocks/drivers/acore/clocks.h
code/sdk/drivers/chips/brandy/clocks/drivers/acore/clocks_config_priv.c
code/sdk/interim_binary/brandy/libs/media/evb_standard/libjs_audio_recorder.a
code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230/libdisplay_gfx.a [deleted file]
code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230_user/libdisplay_gfx.a [deleted file]
code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd272/libdisplay_gfx.a [deleted file]
code/sdk/middleware/services/gui/hal/display/brandy-native-js-ln/libdisplay_gfx.a [deleted file]
code/sdk/middleware/services/gui/hal/display/brandy-native-js-lnppp/libdisplay_gfx.a [deleted file]
code/sdk/middleware/services/gui/hal/display/brandy-native-js-n9/libdisplay_gfx.a
code/sdk/middleware/services/gui/hal/display/brandy-native-js-n9ln/libdisplay_gfx.a [deleted file]
code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230/libuikit_ext.a [deleted file]
code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230_user/libuikit_ext.a [deleted file]
code/sdk/middleware/services/gui/uikit/brandy-native-js-fd272/libuikit_ext.a [deleted file]
code/sdk/middleware/services/gui/uikit/brandy-native-js-ln/libuikit_ext.a [deleted file]
code/sdk/middleware/services/gui/uikit/brandy-native-js-lnppp/libuikit_ext.a [deleted file]
code/sdk/middleware/services/gui/uikit/brandy-native-js-n9ln/libuikit_ext.a [deleted file]
code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_list_ext.h
code/sdk/middleware/services/gui/uikit/proprietary/src/service/src/graphic_service.cpp
code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_lite_surface_view.cpp
code/sdk/middleware/services/gui/uikit/sample/sample_ui.h
code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230-r/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230_user-r/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230_user/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd272-r/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd272/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln-r/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-lnppp-r/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-lnppp/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9ln-r/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9ln/libx_vfs_private.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230-r/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230_user-r/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230_user/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd272-r/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd272/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln-r/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lnppp-r/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lnppp/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9ln-r/libfs_yaffs2.a [deleted file]
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9ln/libfs_yaffs2.a [deleted file]
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230/libams.a [deleted file]
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230_user/libams.a [deleted file]
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd272/libams.a [deleted file]
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-ln/libams.a [deleted file]
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-lnppp/libams.a [deleted file]
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-n9ln/libams.a [deleted file]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230/libbms.a [deleted file]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230_user/libbms.a [deleted file]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd272/libbms.a [deleted file]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-ln/libbms.a [deleted file]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-lnppp/libbms.a [deleted file]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-n9ln/libbms.a [deleted file]
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-n9ln/libjerryscript.a [deleted file]

diff --git a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd230/libuikit_fwk.a b/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd230/libuikit_fwk.a
deleted file mode 100644 (file)
index e3ce469..0000000
Binary files a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd230/libuikit_fwk.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd230_user/libuikit_fwk.a b/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd230_user/libuikit_fwk.a
deleted file mode 100644 (file)
index e3ce469..0000000
Binary files a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd230_user/libuikit_fwk.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd272/libuikit_fwk.a b/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd272/libuikit_fwk.a
deleted file mode 100644 (file)
index e3ce469..0000000
Binary files a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-fd272/libuikit_fwk.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-ln/libuikit_fwk.a b/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-ln/libuikit_fwk.a
deleted file mode 100644 (file)
index e3ce469..0000000
Binary files a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-ln/libuikit_fwk.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-lnppp/libuikit_fwk.a b/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-lnppp/libuikit_fwk.a
deleted file mode 100644 (file)
index e3ce469..0000000
Binary files a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-lnppp/libuikit_fwk.a and /dev/null differ
index e3ce469..dd5873d 100644 (file)
Binary files a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-n9/libuikit_fwk.a and b/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-n9/libuikit_fwk.a differ
diff --git a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-n9ln/libuikit_fwk.a b/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-n9ln/libuikit_fwk.a
deleted file mode 100644 (file)
index e3ce469..0000000
Binary files a/code/sdk/application/wearable/evb/nativeapp/brandy-native-js-n9ln/libuikit_fwk.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportCountdownPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportCountdownPage.h
deleted file mode 100644 (file)
index 5a94db8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportCountdownPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_COUNTDOWN_PAGE_H\r
-#define SPORT_COUNTDOWN_PAGE_H\r
-\r
-#include "animator/animator.h"\r
-#include "components/ui_label.h"\r
-#include "components/ui_circle_progress.h"\r
-#include "components/ui_view_group.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-\r
-namespace OHOS {\r
-class SportCountdownPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportCountdownPage() {}\r
-    ~SportCountdownPage();\r
-    void OnStart(void* data) override;\r
-    void OnPause() override;\r
-    void OnResume() override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void UpdateCountdownView(uint64_t time);\r
-    class SportCountdownAnimatorCallback : public AnimatorCallback {\r
-    public:\r
-        SportCountdownAnimatorCallback(SportCountdownPage* page):page_(page) {}\r
-        virtual ~SportCountdownAnimatorCallback() override {}\r
-        void Callback(UIView* view) override;\r
-    private:\r
-        SportCountdownPage* page_{nullptr};\r
-    };\r
-    Animator* animator_{nullptr};\r
-    SportCountdownAnimatorCallback* callback_{nullptr};\r
-    UIViewGroup *group_{nullptr};\r
-    UILabel *countdownText_{nullptr};\r
-    UICircleProgress *countdownProgress_{nullptr};\r
-    struct timeval startTime_{0};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_COUNTDOWN_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportDataPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportDataPage.h
deleted file mode 100644 (file)
index ae650c8..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportDataPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_DATA_PAGE_H\r
-#define SPORT_DATA_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_canvas.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_sweep_clock.h"\r
-#include "animator/animator.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-\r
-namespace OHOS {\r
-class SportDataPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportDataPage() {}\r
-    ~SportDataPage();\r
-    void OnStart(void* data) override;\r
-    void OnPause() override;\r
-    void OnResume() override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void InitBatteryView();\r
-    void InitTimeLableVIew();\r
-    void ShowUpHeartRate();\r
-    void ShowUpTopView();\r
-    void ShowUpLeftView();\r
-    void ShowUpRightView();\r
-    void ShowUpBottomView();\r
-    void ShowUpSeparateLine();\r
-    void UpdateDataViewByType();\r
-    void CheckTarget();\r
-    void CheckRemind();\r
-    class SportDataAnimatorCallback : public AnimatorCallback {\r
-    public:\r
-        SportDataAnimatorCallback(SportDataPage* page):page_(page) {}\r
-        virtual ~SportDataAnimatorCallback() override {}\r
-        void Callback(UIView* view) override;\r
-    private:\r
-        SportDataPage* page_{nullptr};\r
-    };\r
-    Animator* animator_{nullptr};\r
-    SportDataAnimatorCallback* callback_{nullptr};\r
-    Image *secondHand_{nullptr};\r
-    UISweepClock *sweepClock_{nullptr};\r
-    UIImageView *heartRateScale_{nullptr};\r
-    UIImageView *heartRatePointer_{nullptr};\r
-    UICanvas *separateLine_{nullptr};\r
-    UILabel *topValueLabel_{nullptr};\r
-    UILabel *topUnitLabel_{nullptr};\r
-    UILabel *leftValueLabel_{nullptr};\r
-    UILabel *leftUnitLabel_{nullptr};\r
-    UILabel *rightValueLabel_{nullptr};\r
-    UILabel *rightUnitLabel_{nullptr};\r
-    UILabel *bottomValueLabel_{nullptr};\r
-    UILabel *bottomUnitLabel_{nullptr};\r
-    UILabel *timeLabel_{nullptr};\r
-    UIImageView *batteryIcon_{nullptr};\r
-    UILabel *batteryLabel_{nullptr};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_DATA_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportHeartRateRangeItemView.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportHeartRateRangeItemView.h
deleted file mode 100644 (file)
index b4e20f7..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportHeartRateRangeItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_HEART_RATE_RANGE_ITEM_VIEW_H\r
-#define SPORT_HEART_RATE_RANGE_ITEM_VIEW_H\r
-\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_radio_button.h"\r
-#include "components/ui_label.h"\r
-\r
-namespace OHOS {\r
-typedef struct {\r
-    uint8_t itemId;\r
-    const char *title;\r
-    const char *viewId;\r
-} SportHeartRateRangeItem;\r
-\r
-class SportHeartRateRangeItemView : public UIViewGroup {\r
-public:\r
-    SportHeartRateRangeItemView();\r
-    ~SportHeartRateRangeItemView() override;\r
-\r
-    virtual void SetItemInfo(const SportHeartRateRangeItem &itemInfo);\r
-\r
-private:\r
-    UIImageView bgImage_;\r
-    UILabel title_;\r
-    UILabel range_;\r
-    UIRadioButton button_;\r
-};\r
-}\r
-#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportHeartRateRangePage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportHeartRateRangePage.h
deleted file mode 100644 (file)
index a71eac7..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportHeartRateRangePage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_HEART_RATE_RANGE_PAGE_H\r
-#define SPORT_HEART_RATE_RANGE_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_simple_list.h"\r
-#include "components/ui_scroll_view.h"\r
-#include "SlicePage.h"\r
-#include "UiConfig.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-#include "SportHeartRateRangeItemView.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_HEARTRATE_RANGE_ITEM_1 = "sportHeartRateRangeItem1";\r
-const char* SPORT_HEARTRATE_RANGE_ITEM_2 = "sportHeartRateRangeItem2";\r
-const char* SPORT_HEARTRATE_RANGE_ITEM_3 = "sportHeartRateRangeItem3";\r
-const char* SPORT_HEARTRATE_RANGE_ITEM_4 = "sportHeartRateRangeItem4";\r
-\r
-class SportHeartRateRangePage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportHeartRateRangePage();\r
-    ~SportHeartRateRangePage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void CreateUILabel(void);\r
-    void CreateUIList(void);\r
-    UIScrollView *group_{nullptr};\r
-    UILabel *titleLabel_{nullptr};\r
-    UISimpleList *heartRateRangeList_{nullptr};\r
-    SportHeartRateRangeItem heartRateRanges_[SPORT_HEARTRATE_RANGE_MAX] = {\r
-        {SPORT_HEARTRATE_RANGE_ITEM1, "热身燃脂", SPORT_HEARTRATE_RANGE_ITEM_1},\r
-        {SPORT_HEARTRATE_RANGE_ITEM2, "有氧耐力", SPORT_HEARTRATE_RANGE_ITEM_2},\r
-        {SPORT_HEARTRATE_RANGE_ITEM3, "无氧耐力", SPORT_HEARTRATE_RANGE_ITEM_3},\r
-        {SPORT_HEARTRATE_RANGE_ITEM4, "极限训练", SPORT_HEARTRATE_RANGE_ITEM_4}};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_HEART_RATE_RANGE_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMenuItemView.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMenuItemView.h
deleted file mode 100644 (file)
index 0ed753d..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportMenuItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_MENU_ITEM_VIEW_H\r
-#define SPORT_MENU_ITEM_VIEW_H\r
-\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_label.h"\r
-\r
-namespace OHOS {\r
-typedef struct {\r
-    int bgId;\r
-    int iconId;\r
-    const char *label;\r
-    const char *viewId;\r
-} SportMenuItem;\r
-\r
-class SportMenuItemView : public UIViewGroup {\r
-public:\r
-    SportMenuItemView();\r
-    ~SportMenuItemView() override;\r
-\r
-    virtual void SetItemInfo(const SportMenuItem &itemInfo);\r
-\r
-private:\r
-    UIImageView bgImage_;\r
-    UIImageView icon_;\r
-    UILabel label_;\r
-    UIImageView settingImage_;\r
-};\r
-}\r
-#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMenuPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMenuPage.h
deleted file mode 100644 (file)
index 95e9f30..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportMenuPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_MENU_PAGE_H\r
-#define SPORT_MENU_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_simple_list.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_scroll_view.h"\r
-#include "ui_resource_sport.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-#include "SportMenuItemView.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_ITEM_OUTDOOR_RUNNING = "sportItemOutdoorRunning";\r
-const char* SPORT_ITEM_INDOOR_RUNNING = "sportItemIndoorRunning";\r
-const char* SPORT_ITEM_CYCLING = "sportItemCycling";\r
-const char* SPORT_ITEM_CLIMBING = "sportItemClimbing";\r
-const char* SPORT_ITEM_INDOOR_SWIMMING = "sportItemIndoorSwimming";\r
-const char* SPORT_ITEM_OUTDOOR_SWIMMING = "sportItemOutdoorSwimming";\r
-\r
-class SportMenuPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportMenuPage();\r
-    ~SportMenuPage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void InitBackgroundView();\r
-    void CreateUILabel(void);\r
-    void CreateUIList(void);\r
-    UIScrollView *group_{nullptr};\r
-    UIImageView *background_{nullptr};\r
-    UILabel *titleLabel_{nullptr};\r
-    UISimpleList *sportList_{nullptr};\r
-    SportMenuItem sportMenu_[SPORT_TYPE_MAX] = {\r
-        {IMAGE_SPORT_ITEMBG1, IMAGE_SPORT_OUTDOOR_RUNNING1, "户外跑步", SPORT_ITEM_OUTDOOR_RUNNING},\r
-        {IMAGE_SPORT_ITEMBG2, IMAGE_SPORT_INDOOR_RUNNING1, "室内跑步", SPORT_ITEM_INDOOR_RUNNING},\r
-        {IMAGE_SPORT_ITEMBG3, IMAGE_SPORT_CYCLING1, "骑行", SPORT_ITEM_CYCLING},\r
-        {IMAGE_SPORT_ITEMBG4, IMAGE_SPORT_CLIMBING1, "登山", SPORT_ITEM_CLIMBING},\r
-        {IMAGE_SPORT_ITEMBG6, IMAGE_SPORT_INDOOR_SWIMMING1, "室内游泳", SPORT_ITEM_INDOOR_SWIMMING},\r
-        {IMAGE_SPORT_ITEMBG5, IMAGE_SPORT_OUTDOOR_SWIMMING1, "户外游泳", SPORT_ITEM_OUTDOOR_SWIMMING}};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_MENU_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMistouchPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportMistouchPage.h
deleted file mode 100644 (file)
index 6dbea19..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportMistouchPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_MISTOUCH_PAGE_H\r
-#define SPORT_MISTOUCH_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_toggle_button.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_scroll_view.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_MISTOUCH_SCREEN_BUTTON = "sportMistouchScreenButton";\r
-const char* SPORT_MISTOUCH_CROWN_BUTTON = "sportMistouchCrownButton";\r
-\r
-class SportMistouchPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportMistouchPage() {}\r
-    ~SportMistouchPage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    UIScrollView* group_ = nullptr;\r
-    UILabel* title_ = nullptr;\r
-    UIImageView* bgScreen_ = nullptr;\r
-    UIToggleButton* buttonScreen_ = nullptr;\r
-    UILabel* titleScreen_ = nullptr;\r
-    UIImageView* imageScreen_ = nullptr;\r
-    UIImageView* bgCrown_ = nullptr;\r
-    UIToggleButton* buttonCrown_ = nullptr;\r
-    UILabel* titleCrown_ = nullptr;\r
-    UIImageView* imageCrown_ = nullptr;\r
-    UILabel* textScreen_ = nullptr;\r
-    UILabel* textCrown_ = nullptr;\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_MISTOUCH_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportModel.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportModel.h
deleted file mode 100644 (file)
index 6832bdd..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportModel\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_MODEL_H\r
-#define SPORT_MODEL_H\r
-\r
-#include <vector>\r
-#if defined(_WIN32)\r
-#include "animator/animator.h"\r
-#define SPORT_CONFIG_PATH\r
-#else\r
-#define SPORT_CONFIG_PATH "/user/data/"\r
-#include "ohos_timer.h"\r
-#include "graphic_timer.h"\r
-#endif\r
-\r
-namespace OHOS {\r
-enum SportType : uint8_t {\r
-    SPORT_TYPE_OUTDOOR_RUNNING = 0,\r
-    SPORT_TYPE_INDOOR_RUNNING,\r
-    SPORT_TYPE_CYCLING,\r
-    SPORT_TYPE_CLIMBING,\r
-    SPORT_TYPE_INDOOR_SWIMMING,\r
-    SPORT_TYPE_OUTDOOR_SWIMMING,\r
-    SPORT_TYPE_MAX,\r
-};\r
-\r
-enum SportSetType : uint8_t {\r
-    SPORT_SET_TYPE_TARGET = 0,  // 设置项(目标)和提示类型共用\r
-    SPORT_SET_TYPE_REMIND,      // 设置项(提醒)和提示类型共用\r
-    SPORT_SET_TYPE_MISTOUCH,    // 设置项(防误触)\r
-    SPORT_SET_TYPE_MAX = 3,     // 设置项最大值\r
-    SPORT_SET_TYPE_HEARTRATE,   // 只用于心率提示类型\r
-};\r
-\r
-enum SportTarget : uint8_t {\r
-    SPORT_TARGET_DISTANCE = 0,\r
-    SPORT_TARGET_TIME,\r
-    SPORT_TARGET_CALORIE,\r
-    SPORT_TARGET_MAX,\r
-};\r
-\r
-enum SportRemind : uint8_t {\r
-    SPORT_REMIND_INTERVAL = 0,\r
-    SPORT_REMIND_HEARTRATE,\r
-    SPORT_REMIND_MAX,\r
-};\r
-\r
-enum SportRemindInterval : uint8_t {\r
-    SPORT_REMIND_INTERVAL_NONE = 0,\r
-    SPORT_REMIND_INTERVAL_DISTANCE,\r
-    SPORT_REMIND_INTERVAL_TIME,\r
-    SPORT_REMIND_INTERVAL_MAX,\r
-};\r
-\r
-enum SportRemindHeartRate : uint8_t {\r
-    SPORT_REMIND_HEARTRATE_ENABLE = 0,\r
-    SPORT_REMIND_HEARTRATE_RANGE,\r
-    SPORT_REMIND_HEARTRATE_MAX,\r
-};\r
-\r
-enum SportHeartRateRange : uint8_t {\r
-    SPORT_HEARTRATE_RANGE_ITEM1 = 0,\r
-    SPORT_HEARTRATE_RANGE_ITEM2,\r
-    SPORT_HEARTRATE_RANGE_ITEM3,\r
-    SPORT_HEARTRATE_RANGE_ITEM4,\r
-    SPORT_HEARTRATE_RANGE_MAX,\r
-};\r
-\r
-enum GpsSignal : uint8_t {\r
-    SPORT_GPS_SIGNAL0 = 0,\r
-    SPORT_GPS_SIGNAL1,\r
-    SPORT_GPS_SIGNAL2,\r
-    SPORT_GPS_SIGNAL3,\r
-};\r
-\r
-enum SportAction : uint8_t {\r
-    SPORT_ACTION_START = 1,\r
-    SPORT_ACTION_PAUSE = 2,\r
-    SPORT_ACTION_RESUME = 3,\r
-    SPORT_ACTION_STOP = 4,\r
-};\r
-\r
-enum SportConfig : uint8_t {\r
-    SPORT_CONFIG_INFO = 1,\r
-    SPORT_CONFIG_RECORD = 2,\r
-};\r
-\r
-typedef struct sport_control {\r
-    uint8_t action;\r
-    uint8_t type;\r
-} sport_control_t;\r
-\r
-typedef struct sport_data {\r
-    uint8_t type;          // 运动类型\r
-    uint16_t heartRate;    // 心率\r
-    uint16_t calorie;      // 卡路里\r
-    uint16_t altitude;     // 高度\r
-    uint16_t ascent;       // 海拔上升\r
-    uint16_t descent;      // 海拔下降\r
-    uint32_t distance;     // 运动距离\r
-    uint32_t lap;          // 室内游泳趟数\r
-    uint32_t startTime;    // 运动开始时间\r
-    uint32_t endTime;      // 运动结束时间\r
-    uint32_t elapsedTime;  // 运动总耗时\r
-} sport_data_t;\r
-\r
-typedef struct sport_info {\r
-    SportSetType setType;                // 当前设置项类型(目标或提醒)\r
-    SportSetType promptType;             // 当前提醒项类型\r
-    bool isTargetSetted;                 // 是否已设置过目标\r
-    SportTarget targetType;              // 目标类型\r
-    SportTarget targetTypeTemp;          // 临时目标类型,用于恢复没有成功设置目标类型时\r
-    uint16_t targetValue;                // 设置的目标值,在Picker中选择的值\r
-    bool targetHalf;                     // 是否达到一半目标\r
-    bool targetComplete;                 // 是否达成半目标\r
-    bool isRemindSetted;                 // 是否已设置过提醒\r
-    SportRemindInterval remindType;      // 提醒类型\r
-    SportRemindInterval remindTypeTemp;  // 临时提醒类型,用于恢复没有成功设置提醒类型时\r
-    uint16_t remindIndex;                // 提醒的索引值,在Picker中的索引值\r
-    uint16_t remindValue;                // 设置的提醒值,在Picker中选择的值\r
-    uint16_t remindTimes;                // 已经提醒的次数\r
-    bool enableHeartRemind;              // 是否开启心率提醒\r
-    bool isHeartReminded;                // 同区间的心率值是否已经提醒过\r
-    SportHeartRateRange heartRange;      // 设置的心率提醒区间\r
-    bool enableScreenLock;               // 是否开启屏幕锁定\r
-    bool enableCrownLock;                // 是否开启表冠锁定\r
-    uint32_t startTimeTemp;              // 用于暂停时再继续运动时计算运动耗时\r
-    sport_data_t data;                   // 各项运动数据\r
-} sport_info_t;\r
-\r
-std::string GetCurrentTimeStr();\r
-std::string ConvertDistance(uint32_t distance);\r
-std::string FormatSportTime(uint32_t uiSportTime);\r
-std::string CalculateSpeed(uint32_t distance, uint32_t time);\r
-const char *GetHeartRateRangeDescription(uint8_t range);\r
-uint16_t GetHeartRateRangeBounder(uint8_t index);\r
-\r
-class SportModel {\r
-public:\r
-    enum class SportState : uint8_t { STOPPED, RUNNING, PAUSED };\r
-    static SportModel &GetInstance(void);\r
-    void SetSportType(SportType sportType);\r
-    SportType GetSportType(void);\r
-    void SetTargetValue(uint16_t index);\r
-    void SetRemindValue(uint16_t index);\r
-    void SetGpsSignal(GpsSignal gpsSignal);\r
-    GpsSignal GetGpsSignal(void);\r
-    uint16_t GetHeartRate(void);\r
-    sport_info_t *GetSportInfo(SportType type);\r
-    sport_info_t *GetCurrSportInfo();\r
-    uint32_t GetElapsedTime();\r
-    void StartSport(bool startedByWatch);\r
-    void PauseAndReport(bool isReport);\r
-    void ResumeAndReport(bool isReport);\r
-    void StopAndReport(bool isReport);\r
-    void AddRecord();\r
-    void ClearRecord();\r
-    std::vector<sport_data_t> &GetRecord();\r
-    bool IsStartByWatch();\r
-    void LoadConfig();\r
-    void SaveConfig(uint8_t config);\r
-    void ClearData();\r
-\r
-private:\r
-    SportModel();\r
-    SportModel(const SportModel &);\r
-    SportModel &operator=(const SportModel &);\r
-    virtual ~SportModel();\r
-    SportType curSport_;\r
-    sport_info_t info_[SPORT_TYPE_MAX];\r
-    GpsSignal gpsSignal_;\r
-    bool isStartByWatch_{false};\r
-    SportState state_;\r
-    std::vector<sport_data_t> records_;\r
-#if defined(_WIN32)\r
-    class SportAnimatorCallback : public AnimatorCallback {\r
-    public:\r
-        SportAnimatorCallback() {}\r
-        virtual ~SportAnimatorCallback() override {}\r
-        void Callback(UIView *view) override;\r
-\r
-    private:\r
-    };\r
-    SportAnimatorCallback *callback_{nullptr};\r
-    Animator *animator_{nullptr};\r
-#else\r
-    GraphicTimer *generateDataHandle_{nullptr};\r
-    void InitGenerateSportData();\r
-    void StartGenerateSportData();\r
-    void StopGenerateSportData();\r
-#endif\r
-};\r
-}\r
-\r
-#endif  // SPORT_MODEL_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPausePage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPausePage.h
deleted file mode 100644 (file)
index 232b06a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportPausePage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_PAUSE_PAGE_H\r
-#define SPORT_PAUSE_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_label_button.h"\r
-#include "components/ui_view_group.h"\r
-#include "animator/animator.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_PAUSE_CONTINUE_BUTTON = "sportPauseContinueButton";\r
-const char* SPORT_PAUSE_FINISH_BUTTON = "sportPauseFinishButton";\r
-\r
-class SportPausePage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportPausePage() {}\r
-    ~SportPausePage();\r
-    void OnStart(void* data) override;\r
-    void OnPause() override;\r
-    void OnResume() override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void CreateUILabel(void);\r
-    void CreateUIButton(void);\r
-    class SportPauseAnimatorCallback : public AnimatorCallback {\r
-    public:\r
-        SportPauseAnimatorCallback() {}\r
-        virtual ~SportPauseAnimatorCallback() override {}\r
-        void Callback(UIView* view) override;\r
-    };\r
-    SportPauseAnimatorCallback* callback_{nullptr};\r
-    Animator* animator_{nullptr};\r
-    UIViewGroup *group_{nullptr};\r
-    UILabel *timeLabel_{nullptr};\r
-    UILabel *textLabel_{nullptr};\r
-    UILabelButton *continueButton_{nullptr};\r
-    UILabelButton *finishButton_{nullptr};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_PAUSE_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPreparePage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPreparePage.h
deleted file mode 100644 (file)
index 20756b5..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportPreparePage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_PREPARE_PAGE_H\r
-#define SPORT_PREPARE_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_label_button.h"\r
-#include "components/ui_view_group.h"\r
-#include "animator/animator.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_PREPARE_GO_BUTTON = "sportPrepareGoButton";\r
-\r
-class SportPreparePage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportPreparePage() {}\r
-    ~SportPreparePage();\r
-    void OnStart(void* data) override;\r
-    void OnPause() override;\r
-    void OnResume() override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void InitGpsSignalImage();\r
-    void InitBackgroundView();\r
-    void InitBatteryView();\r
-    void InitHeartbeatView();\r
-    void InitTimeLableVIew();\r
-    void InitCenterView();\r
-    void InitGPSView();\r
-    void InitHeartRateView();\r
-    void InitGoButtonView();\r
-    class SportPrepareAnimatorCallback : public AnimatorCallback {\r
-    public:\r
-        SportPrepareAnimatorCallback(SportPreparePage* page):page_(page) {}\r
-        virtual ~SportPrepareAnimatorCallback() override {}\r
-        void Callback(UIView* view) override;\r
-    private:\r
-        SportPreparePage* page_{nullptr};\r
-    };\r
-    SportPrepareAnimatorCallback* callback_{nullptr};\r
-    Animator* animator_{nullptr};\r
-    UIViewGroup *group_{nullptr};\r
-    UIImageView *background_{nullptr};\r
-    UILabel *timeLabel_{nullptr};\r
-    UIImageView *batteryIcon_{nullptr};\r
-    UILabel *batteryLabel_{nullptr};\r
-    UILabel *locatingLabel_{nullptr};\r
-    UIImageView *gpsImageView_{nullptr};\r
-    UIImageView *gpsSignalView_{nullptr};\r
-    UIImageView *heartRateImageView_{nullptr};\r
-    UILabel *heartRateLabel_{nullptr};\r
-    UILabelButton *goButton_{nullptr};\r
-    UIImageView *iconImageView_{nullptr};\r
-    time_t startTime_{0};\r
-    bool isOverTime_{false};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_PREPARE_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPresenter.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPresenter.h
deleted file mode 100644 (file)
index bad4570..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportPresenter\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_PRESENTER_H\r
-#define SPORT_PRESENTER_H\r
-\r
-#include "Presenter.h"\r
-\r
-namespace OHOS {\r
-class SportView;\r
-class SportPresenter : public Presenter<SportView> {};\r
-}\r
-\r
-#endif  // SPORT_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPromptPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportPromptPage.h
deleted file mode 100644 (file)
index cbd9fef..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportPromptPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_PROMPT_PAGE_H\r
-#define SPORT_PROMPT_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_button.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_view_group.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_PROMPT_CANCEL_BUTTON = "sportPromptCancelButton";\r
-const char* SPORT_PROMPT_CONFIRM_BUTTON = "sportPromptConfirmButton";\r
-\r
-class SportPromptPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportPromptPage() {}\r
-    ~SportPromptPage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void CreateUILabel(void);\r
-    void CreateUIButton(void);\r
-    UIViewGroup *group_{nullptr};\r
-    UIImageView *promptIcon_{nullptr};\r
-    UILabel *promptLabel_{nullptr};\r
-    UIButton *cancelButton_{nullptr};\r
-    UIButton *confirmButton_{nullptr};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_PROMPT_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindHeartRateItemView.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindHeartRateItemView.h
deleted file mode 100644 (file)
index 12e7d90..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindHeartRateItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_REMIND_HEART_RATE_ITEM_VIEW_H\r
-#define SPORT_REMIND_HEART_RATE_ITEM_VIEW_H\r
-\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_toggle_button.h"\r
-#include "components/ui_label.h"\r
-\r
-namespace OHOS {\r
-typedef struct {\r
-    uint8_t itemId;\r
-    int iconId;\r
-    const char *label;\r
-    const char *viewId;\r
-} SportRemindHeartRateItem;\r
-\r
-class SportRemindHeartRateItemView : public UIViewGroup {\r
-public:\r
-    SportRemindHeartRateItemView();\r
-    ~SportRemindHeartRateItemView() override;\r
-\r
-    virtual void SetItemInfo(const SportRemindHeartRateItem &itemInfo);\r
-\r
-private:\r
-    UIImageView bgImage_;\r
-    UIImageView icon_;\r
-    UILabel label_;\r
-    UILabel hits_;\r
-    UIToggleButton button_;\r
-    UIImageView nextImage_;\r
-};\r
-}\r
-#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindHeartRatePage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindHeartRatePage.h
deleted file mode 100644 (file)
index 34ebec7..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindHeartRatePage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_REMIND_HEART_RATE_PAGE_H\r
-#define SPORT_REMIND_HEART_RATE_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_simple_list.h"\r
-#include "components/ui_view_group.h"\r
-#include "UiConfig.h"\r
-#include "ui_resource_sport.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-#include "SportRemindHeartRateItemView.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_REMIND_HEARTRATE_ITEM_ENABLE = "sportRemindHeartRateItemEnable";\r
-const char* SPORT_REMIND_HEARTRATE_ITEM_RANGE = "sportRemindHeartRateItemRange";\r
-\r
-class SportRemindHeartRatePage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportRemindHeartRatePage();\r
-    ~SportRemindHeartRatePage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void CreateUILabel(void);\r
-    void CreateUIList(void);\r
-    UIViewGroup *group_{nullptr};\r
-    UILabel *titleLabel_{nullptr};\r
-    UISimpleList *remindHeartRateList_{nullptr};\r
-    SportRemindHeartRateItem remindHeartRates_[SPORT_REMIND_HEARTRATE_MAX] = {\r
-        {SPORT_REMIND_HEARTRATE_ENABLE, IMAGE_SPORT_HEARTRATE, "心率提醒", SPORT_REMIND_HEARTRATE_ITEM_ENABLE},\r
-        {SPORT_REMIND_HEARTRATE_RANGE, IMAGE_SPORT_HEARTRATE, "心率范围", SPORT_REMIND_HEARTRATE_ITEM_RANGE}};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_REMIND_HEART_RATE_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindIntervalItemView.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindIntervalItemView.h
deleted file mode 100644 (file)
index 4ad204c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindIntervalItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_REMIND_INTERVAL_ITEM_VIEW_H\r
-#define SPORT_REMIND_INTERVAL_ITEM_VIEW_H\r
-\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_label.h"\r
-\r
-namespace OHOS {\r
-typedef struct {\r
-    uint8_t itemId;\r
-    int iconId;\r
-    const char *label;\r
-    const char *viewId;\r
-} SportRemindIntervalItem;\r
-\r
-class SportRemindIntervalItemView : public UIViewGroup {\r
-public:\r
-    SportRemindIntervalItemView();\r
-    ~SportRemindIntervalItemView() override;\r
-\r
-    virtual void SetItemInfo(const SportRemindIntervalItem &itemInfo);\r
-\r
-private:\r
-    UIImageView bgImage_;\r
-    UIImageView icon_;\r
-    UILabel label_;\r
-    UIImageView nextImage_;\r
-};\r
-}\r
-#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindIntervalPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindIntervalPage.h
deleted file mode 100644 (file)
index 08d7f50..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindIntervalPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_REMIND_INTERVAL_PAGE_H\r
-#define SPORT_REMIND_INTERVAL_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_simple_list.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_scroll_view.h"\r
-#include "SlicePage.h"\r
-#include "ui_resource_sport.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-#include "SportRemindIntervalItemView.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_REMIND_INTERVAL_ITEM_DISTANCE = "sportRemindIntervalItemDistance";\r
-const char* SPORT_REMIND_INTERVAL_ITEM_TIME = "sportRemindIntervalItemTime";\r
-const char* SPORT_REMIND_INTERVAL_ITEM_NONE = "sportRemindIntervalItemNone";\r
-\r
-class SportRemindIntervalPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportRemindIntervalPage();\r
-    ~SportRemindIntervalPage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void InitBackgroundView();\r
-    void CreateUILabel(void);\r
-    void CreateUIList(void);\r
-    UIScrollView *group_{nullptr};\r
-    UIImageView *background_{nullptr};\r
-    UILabel *titleLabel_{nullptr};\r
-    UISimpleList *remindIntervalList_{nullptr};\r
-    SportRemindIntervalItem remindIntervals_[SPORT_REMIND_INTERVAL_MAX] = {\r
-        {SPORT_REMIND_INTERVAL_DISTANCE, IMAGE_SPORT_DISTANCE, "距离", SPORT_REMIND_INTERVAL_ITEM_DISTANCE},\r
-        {SPORT_REMIND_INTERVAL_TIME, IMAGE_SPORT_TIME, "时间", SPORT_REMIND_INTERVAL_ITEM_TIME},\r
-        {SPORT_REMIND_INTERVAL_NONE, IMAGE_SPORT_NONE, "无提醒", SPORT_REMIND_INTERVAL_ITEM_NONE}};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_REMIND_INTERVAL_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindItemView.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindItemView.h
deleted file mode 100644 (file)
index 9c3368e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_REMIND_ITEM_VIEW_H\r
-#define SPORT_REMIND_ITEM_VIEW_H\r
-\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_label.h"\r
-\r
-namespace OHOS {\r
-typedef struct {\r
-    uint8_t itemId;\r
-    int iconId;\r
-    const char *label;\r
-    const char *viewId;\r
-} SportRemindItem;\r
-\r
-class SportRemindItemView : public UIViewGroup {\r
-public:\r
-    SportRemindItemView();\r
-    ~SportRemindItemView() override;\r
-\r
-    virtual void SetItemInfo(const SportRemindItem &itemInfo);\r
-\r
-private:\r
-    UIImageView bgImage_;\r
-    UIImageView icon_;\r
-    UILabel label_;\r
-    UILabel hits_;\r
-    UIImageView nextImage_;\r
-};\r
-}\r
-#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportRemindPage.h
deleted file mode 100644 (file)
index 7b5b4d0..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_REMIND_PAGE_H\r
-#define SPORT_REMIND_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_simple_list.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_view_group.h"\r
-#include "SlicePage.h"\r
-#include "ui_resource_sport.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-#include "SportRemindItemView.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_REMIND_ITEM_INTERVAL = "sportRemindItemInterval";\r
-const char* SPORT_REMIND_ITEM_HEARTRATE = "sportRemindItemHeartRate";\r
-\r
-class SportRemindPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportRemindPage();\r
-    ~SportRemindPage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void InitBackgroundView();\r
-    void CreateUILabel(void);\r
-    void CreateUIList(void);\r
-    UIViewGroup *group_{nullptr};\r
-    UIImageView *background_{nullptr};\r
-    UILabel *titleLabel_{nullptr};\r
-    UISimpleList *remindList_{nullptr};\r
-    SportRemindItem reminds_[SPORT_REMIND_MAX] = {\r
-        {SPORT_REMIND_INTERVAL, IMAGE_SPORT_INTERVAL, "间隔提醒", SPORT_REMIND_ITEM_INTERVAL},\r
-        {SPORT_REMIND_HEARTRATE, IMAGE_SPORT_HEARTRATE, "心率提醒", SPORT_REMIND_ITEM_HEARTRATE}};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_REMIND_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportSettingsItemView.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportSettingsItemView.h
deleted file mode 100644 (file)
index 124719e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportSettingsItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_SETTINGS_ITEM_VIEW_H\r
-#define SPORT_SETTINGS_ITEM_VIEW_H\r
-\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_label.h"\r
-\r
-namespace OHOS {\r
-typedef struct {\r
-    uint8_t itemId;\r
-    int iconId;\r
-    const char *label;\r
-    const char *viewId;\r
-} SportSettingsItem;\r
-\r
-class SportSettingsItemView : public UIViewGroup {\r
-public:\r
-    SportSettingsItemView();\r
-    ~SportSettingsItemView() override;\r
-\r
-    virtual void SetItemInfo(const SportSettingsItem &itemInfo);\r
-\r
-private:\r
-    UIImageView bgImage_;\r
-    UIImageView icon_;\r
-    UILabel label_;\r
-    UILabel hits_;\r
-    UIImageView nextImage_;\r
-};\r
-}\r
-#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportSettingsPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportSettingsPage.h
deleted file mode 100644 (file)
index 50f41dd..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportSettingsPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_SETTINGS_PAGE_H\r
-#define SPORT_SETTINGS_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_simple_list.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_scroll_view.h"\r
-#include "SlicePage.h"\r
-#include "ui_resource_sport.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-#include "SportSettingsItemView.h"\r
-\r
-namespace OHOS {\r
-const char* SETTINGS_ITEM_TARGET = "settingsItemTarget";\r
-const char* SETTINGS_ITEM_REMIND = "settingsItemTargetRemind";\r
-const char* SETTINGS_ITEM_MISTOUCH = "settingsItemTargetMistouch";\r
-\r
-class SportSettingsPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportSettingsPage();\r
-    ~SportSettingsPage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void InitBackgroundView();\r
-    void CreateUILabel(void);\r
-    void CreateUIList(void);\r
-    UIScrollView *group_{nullptr};\r
-    UIImageView *background_{nullptr};\r
-    UILabel *titleLabel_{nullptr};\r
-    UISimpleList *settingList_{nullptr};\r
-    SportSettingsItem settings_[SPORT_SET_TYPE_MAX] = {\r
-        {SPORT_SET_TYPE_TARGET, IMAGE_SPORT_TARGET, "目标", SETTINGS_ITEM_TARGET},\r
-        {SPORT_SET_TYPE_REMIND, IMAGE_SPORT_REMIND, "提醒", SETTINGS_ITEM_REMIND},\r
-        {SPORT_SET_TYPE_MISTOUCH, IMAGE_SPORT_MISTOUCH, "防误触", SETTINGS_ITEM_MISTOUCH},\r
-        };\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_SETTINGS_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetItemView.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetItemView.h
deleted file mode 100644 (file)
index e36075a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportTargetItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_TARGET_ITEM_VIEW_H\r
-#define SPORT_TARGET_ITEM_VIEW_H\r
-\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_label.h"\r
-\r
-namespace OHOS {\r
-typedef struct {\r
-    uint8_t itemId;\r
-    int iconId;\r
-    const char *label;\r
-    const char *viewId;\r
-} SportTargetItem;\r
-\r
-class SportTargetItemView : public UIViewGroup {\r
-public:\r
-    SportTargetItemView();\r
-    ~SportTargetItemView() override;\r
-\r
-    virtual void SetItemInfo(const SportTargetItem &itemInfo);\r
-\r
-private:\r
-    UIImageView bgImage_;\r
-    UIImageView icon_;\r
-    UILabel label_;\r
-    UIImageView nextImage_;\r
-};\r
-}\r
-#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetPage.h
deleted file mode 100644 (file)
index 00e7fd8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportTargetPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_TARGET_PAGE_H\r
-#define SPORT_TARGET_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_simple_list.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_scroll_view.h"\r
-#include "SlicePage.h"\r
-#include "ui_resource_sport.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-#include "SportTargetItemView.h"\r
-\r
-namespace OHOS {\r
-const char* SPORT_TARGET_ITEM_DISTANCE = "sportTargetItemDistance";\r
-const char* SPORT_TARGET_ITEM_TIME = "sportTargetItemTime";\r
-const char* SPORT_TARGET_ITEM_CALORIE = "sportTargetItemCalorie";\r
-\r
-class SportTargetPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportTargetPage();\r
-    ~SportTargetPage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void InitBackgroundView();\r
-    void CreateUILabel(void);\r
-    void CreateUIList(void);\r
-    UIScrollView *group_{nullptr};\r
-    UIImageView *background_{nullptr};\r
-    UILabel *titleLabel_{nullptr};\r
-    UISimpleList *targetList_{nullptr};\r
-    SportTargetItem targets_[SPORT_TARGET_MAX] = {\r
-        {SPORT_TARGET_DISTANCE, IMAGE_SPORT_DISTANCE, "距离", SPORT_TARGET_ITEM_DISTANCE},\r
-        {SPORT_TARGET_TIME, IMAGE_SPORT_TIME, "时间", SPORT_TARGET_ITEM_TIME},\r
-        {SPORT_TARGET_CALORIE, IMAGE_SPORT_CALORIE, "热量", SPORT_TARGET_ITEM_CALORIE}};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_TARGET_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetPromptPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetPromptPage.h
deleted file mode 100644 (file)
index 964a590..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportTargetPromptPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_TARGET_PROMPT_PAGE_H\r
-#define SPORT_TARGET_PROMPT_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_image_view.h"\r
-#include "components/ui_view_group.h"\r
-#include "animator/animator.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-\r
-namespace OHOS {\r
-\r
-class SportTargetPromptPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener {\r
-public:\r
-    SportTargetPromptPage() {}\r
-    ~SportTargetPromptPage();\r
-    void OnStart(void* data) override;\r
-    void OnPause() override;\r
-    void OnResume() override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void CreatePromptView(void);\r
-    class SportPromptAnimatorCallback : public AnimatorCallback {\r
-    public:\r
-        SportPromptAnimatorCallback(SportTargetPromptPage* page):page_(page) {}\r
-        virtual ~SportPromptAnimatorCallback() override {}\r
-        void Callback(UIView* view) override;\r
-    private:\r
-        SportTargetPromptPage* page_{nullptr};\r
-    };\r
-    SportPromptAnimatorCallback* callback_{nullptr};\r
-    Animator* animator_{nullptr};\r
-    UIViewGroup *group_{nullptr};\r
-    UIImageView *promptIcon_{nullptr};\r
-    UILabel *promptLabel_{nullptr};\r
-    time_t startTime_{0};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_TARGET_PROMPT_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetSettingPage.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportTargetSettingPage.h
deleted file mode 100644 (file)
index 3fec391..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportTargetSettingPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_TARGET_SETTING_PAGE_H\r
-#define SPORT_TARGET_SETTING_PAGE_H\r
-\r
-#include "components/ui_label.h"\r
-#include "components/ui_label_button.h"\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_picker.h"\r
-#include "SlicePage.h"\r
-#include "SportPresenter.h"\r
-#include "SportModel.h"\r
-\r
-namespace OHOS {\r
-const char* TARGET_SETTING_CONFIRM_BUTTON = "targetSettingConfirmButton";\r
-\r
-class SportTargetSettingPage : public SlicePage<SportPresenter>,\r
-    public UIView::OnClickListener,\r
-    public UIView::OnDragListener,\r
-    public UIPicker::SelectedListener {\r
-public:\r
-    SportTargetSettingPage() {}\r
-    ~SportTargetSettingPage();\r
-    void OnStart(void* data) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-private:\r
-    void UpdateViewByTargetType();\r
-    void UpdateViewByRemindType();\r
-    void CreateUILabel(void);\r
-    void CreateUIPicker(void);\r
-    void CreateUIButton(void);\r
-    UIViewGroup *group_{nullptr};\r
-    UILabel *titleLabel_{nullptr};\r
-    UIPicker *picker_{nullptr};\r
-    UILabelButton *confirmButton_{nullptr};\r
-};\r
-}  // namespace OHOS\r
-#endif  // SPORT_TARGET_SETTING_PAGE_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportView.h b/code/sdk/application/wearable/evb/nativeapp/nativeui/include/sport/SportView.h
deleted file mode 100644 (file)
index 96bbf81..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#ifndef SPORT_VIEW_H\r
-#define SPORT_VIEW_H\r
-\r
-#include "View.h"\r
-\r
-namespace OHOS {\r
-enum SportPages : uint8_t {\r
-    SPORT_PAGE_MENU = 1,\r
-    SPORT_PAGE_PREPARE,\r
-    SPORT_PAGE_COUNTDOWN,\r
-    SPORT_PAGE_DATA,\r
-    SPORT_PAGE_PAUSE,\r
-    SPORT_PAGE_PROMPT,\r
-    SPORT_PAGE_SETTINGS,\r
-    SPORT_PAGE_TARGET,\r
-    SPORT_PAGE_TARGET_SETTING,\r
-    SPORT_PAGE_TARGET_PROMPT,\r
-    SPORT_PAGE_REMIND,\r
-    SPORT_PAGE_REMIND_INTERVAL,\r
-    SPORT_PAGE_REMIND_HEARTRATE,\r
-    SPORT_PAGE_HEARTRATE_RANGE,\r
-    SPORT_PAGE_MISTOUCH,\r
-    SPORT_PAGE_MAX,\r
-};\r
-\r
-class SportPresenter;\r
-class SportView : public View<SportPresenter> {};\r
-}\r
-#endif  // SPORT_VIEW_H\r
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportCountdownPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportCountdownPage.cpp
deleted file mode 100644 (file)
index f08e4ad..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportCountdownPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include <sys/time.h>\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportCountdownPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t TEXT_X = 164;\r
-static constexpr uint16_t TEXT_Y = 154;\r
-static constexpr uint16_t TEXT_W = 132;\r
-static constexpr uint16_t TEXT_H = 132;\r
-static constexpr uint16_t TEXT_FONT = 120;\r
-static constexpr uint16_t PROCESS_X = 90;\r
-static constexpr uint16_t PROCESS_Y = 90;\r
-static constexpr uint16_t PROCESS_W = 273;\r
-static constexpr uint16_t PROCESS_H = 273;\r
-static constexpr uint16_t PROCESS_CENTER_X = 135;\r
-static constexpr uint16_t PROCESS_CENTER_Y = 135;\r
-static constexpr uint16_t PROCESS_MAX_RANGE = 100;\r
-static constexpr uint16_t PROCESS_RADIUS = 120;\r
-static constexpr uint16_t PROCESS_START_ANGLE = 360;\r
-static constexpr uint16_t PROCESS_LINE_WIDTH = 20;\r
-static constexpr uint16_t COUNTDOWN_TIME = 3;\r
-static constexpr uint32_t MICRO_SECONDS_PER_SECOND = 1000000;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_COUNTDOWN, SportCountdownPage, false);\r
-\r
-void SportCountdownPage::UpdateCountdownView(uint64_t time)\r
-{\r
-    uint8_t reminTime = COUNTDOWN_TIME - (time / MICRO_SECONDS_PER_SECOND);\r
-    if (reminTime != 0) {\r
-        countdownText_->SetText(std::to_string(reminTime).c_str());\r
-    }\r
-    double precent = static_cast<double>(time) / (COUNTDOWN_TIME * MICRO_SECONDS_PER_SECOND);\r
-    countdownProgress_->SetValue(precent * PROCESS_MAX_RANGE);\r
-}\r
-\r
-void SportCountdownPage::SportCountdownAnimatorCallback::Callback(UIView *view)\r
-{\r
-    UNUSED(view);\r
-    struct timeval currTime = {0};\r
-    gettimeofday(&currTime, nullptr);\r
-    uint64_t time = ((uint64_t)currTime.tv_sec * MICRO_SECONDS_PER_SECOND + currTime.tv_usec) -\r
-                    ((uint64_t)page_->startTime_.tv_sec * MICRO_SECONDS_PER_SECOND + page_->startTime_.tv_usec);\r
-    page_->UpdateCountdownView(time);\r
-    if (time / MICRO_SECONDS_PER_SECOND >= COUNTDOWN_TIME) {\r
-        page_->animator_->Stop();\r
-        SportModel::GetInstance().StartSport(true);\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_DATA,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-}\r
-\r
-SportCountdownPage::~SportCountdownPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (countdownText_ != nullptr) {\r
-        delete countdownText_;\r
-        countdownText_ = nullptr;\r
-    }\r
-    if (countdownProgress_ != nullptr) {\r
-        delete countdownProgress_;\r
-        countdownProgress_ = nullptr;\r
-    }\r
-    if (animator_ != nullptr) {\r
-        delete animator_;\r
-        animator_ = nullptr;\r
-    }\r
-    if (callback_ != nullptr) {\r
-        delete callback_;\r
-        callback_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportCountdownPage::~SportCountdownPage");\r
-}\r
-\r
-void SportCountdownPage::OnStart(void *data)\r
-{\r
-    gettimeofday(&startTime_, nullptr);\r
-    group_ = new UIViewGroup();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportCountdownPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-\r
-    countdownText_ = new UILabel();\r
-    if (countdownText_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportCountdownPage countdownText_ new fail");\r
-        return;\r
-    }\r
-    countdownText_->SetPosition(TEXT_X, TEXT_Y, TEXT_W, TEXT_H);\r
-    countdownText_->SetFont(BOLD_VECTOR_FONT_FILENAME, TEXT_FONT);\r
-    countdownText_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    group_->Add(countdownText_);\r
-\r
-    countdownProgress_ = new UICircleProgress();\r
-    if (countdownProgress_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportCountdownPage new countdownProgress_ fail");\r
-        return;\r
-    }\r
-    countdownProgress_->SetPosition(PROCESS_X, PROCESS_Y, PROCESS_W, PROCESS_H);\r
-    countdownProgress_->SetCenterPosition(PROCESS_CENTER_X, PROCESS_CENTER_Y);\r
-    countdownProgress_->SetRange(PROCESS_MAX_RANGE, 0);\r
-    countdownProgress_->SetRadius(PROCESS_RADIUS);\r
-    countdownProgress_->SetStartAngle(PROCESS_START_ANGLE);\r
-    countdownProgress_->SetEndAngle(0);\r
-    countdownProgress_->SetForegroundStyle(STYLE_LINE_COLOR, 0xff14d3dd);\r
-    countdownProgress_->SetForegroundStyle(STYLE_LINE_WIDTH, PROCESS_LINE_WIDTH);\r
-    countdownProgress_->SetBackgroundStyle(STYLE_LINE_COLOR, 0xff549490);\r
-    countdownProgress_->SetBackgroundStyle(STYLE_LINE_WIDTH, PROCESS_LINE_WIDTH);\r
-    group_->Add(countdownProgress_);\r
-    AddViewToPageContainer(group_);\r
-\r
-    callback_ = new SportCountdownAnimatorCallback(this);\r
-    if (callback_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportCountdownPage::OnStart callback_ new fail");\r
-        return;\r
-    }\r
-\r
-    animator_ = new Animator(callback_, nullptr, 0, true);\r
-    if (animator_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportCountdownPage::OnStart new Animator animator_ fail");\r
-        return;\r
-    }\r
-}\r
-\r
-void SportCountdownPage::OnPause()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() != Animator::STOP) {\r
-            animator_->Stop();\r
-        }\r
-    }\r
-}\r
-\r
-void SportCountdownPage::OnResume()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() == Animator::STOP) {\r
-            animator_->Start();\r
-        }\r
-    }\r
-}\r
-\r
-bool SportCountdownPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    return false;\r
-}\r
-\r
-bool SportCountdownPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    return false;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportDataPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportDataPage.cpp
deleted file mode 100644 (file)
index 1b26a0e..0000000
+++ /dev/null
@@ -1,632 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportDataPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "settings/model/SettingPowerModel.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportDataPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t TARGET_HALF = 2;\r
-static constexpr uint16_t NUM_ONE = 1;\r
-static constexpr uint16_t NUM_THOUSAND = 1000;\r
-static constexpr uint16_t BATTERY_LEVEL1 = 10;\r
-static constexpr uint16_t BATTERY_LEVEL2 = 20;\r
-static constexpr uint16_t BATTERY_LEVEL3 = 40;\r
-static constexpr uint16_t BATTERY_LEVEL4 = 70;\r
-static constexpr uint16_t BATTERY_LEVEL5 = 100;\r
-static constexpr uint16_t UNIT_SECS_PER_MIN = 60;\r
-static constexpr uint16_t HAND_POSITION_XPOS = 224;\r
-static constexpr uint16_t HAND_POSITION_YPOS = 4;\r
-static constexpr uint16_t HAND_CENTER_XPOS = 3;\r
-static constexpr uint16_t HAND_CENTER_YPOS = 223;\r
-static constexpr uint16_t HAND_WIDTH = 2;\r
-static constexpr uint16_t HAND_HEIGHT = 5;\r
-static constexpr uint16_t HEARTBEAT_MIN = 116;\r
-static constexpr uint16_t HEARTBEAT_MID = 156;\r
-static constexpr uint16_t HEARTBEAT_MAX = 195;\r
-static constexpr uint16_t HEARTBEAT_CONVERT_UNIT = 600;\r
-static constexpr uint16_t HEARTBEAT_BASE1 = 24000;\r
-static constexpr uint16_t HEARTBEAT_BASE2 = 36000;\r
-static constexpr uint16_t HEARTBEAT_IMAGE_X = 132;\r
-static constexpr uint16_t HEARTBEAT_IMAGE_Y = 174;\r
-static constexpr uint16_t BATTERY_ICON_X = 160;\r
-static constexpr uint16_t BATTERY_ICON_Y = 405;\r
-static constexpr uint16_t BATTERY_LABEL_FONT = 20;\r
-static constexpr uint16_t BATTERY_LABEL_X = 164;\r
-static constexpr uint16_t BATTERY_LABEL_Y = 405;\r
-static constexpr uint16_t BATTERY_LABEL_W = 35;\r
-static constexpr uint16_t BATTERY_LABEL_H = 20;\r
-static constexpr uint16_t TIME_LABEL_FONT = 32;\r
-static constexpr uint16_t TIME_LABEL_X = 219;\r
-static constexpr uint16_t TIME_LABEL_Y = 395;\r
-static constexpr uint16_t TIME_LABEL_W = 84;\r
-static constexpr uint16_t TIME_LABEL_H = 47;\r
-static constexpr uint16_t TOP_VALUE_LABEL_FONT = 100;\r
-static constexpr uint16_t VALUE_LABEL_FONT = 56;\r
-static constexpr uint16_t UNIT_LABEL_FONT = 24;\r
-static constexpr uint16_t TOP_VALUE_LABEL_X = 142;\r
-static constexpr uint16_t TOP_VALUE_LABEL_Y = 73;\r
-static constexpr uint16_t TOP_VALUE_LABEL_W = 172;\r
-static constexpr uint16_t TOP_VALUE_LABEL_H = 100;\r
-static constexpr uint16_t TOP_UNIT_LABEL_X = 160;\r
-static constexpr uint16_t TOP_UNIT_LABEL_Y = 173;\r
-static constexpr uint16_t TOP_UNIT_LABEL_W = 166;\r
-static constexpr uint16_t TOP_UNIT_LABEL_H = 25;\r
-static constexpr uint16_t LEFT_VALUE_LABEL_X = 44;\r
-static constexpr uint16_t LEFT_VALUE_LABEL_Y = 212;\r
-static constexpr uint16_t LEFT_VALUE_LABEL_W = 175;\r
-static constexpr uint16_t LEFT_VALUE_LABEL_H = 56;\r
-static constexpr uint16_t LEFT_UNIT_LABEL_X = 44;\r
-static constexpr uint16_t LEFT_UNIT_LABEL_Y = 272;\r
-static constexpr uint16_t LEFT_UNIT_LABEL_W = 175;\r
-static constexpr uint16_t LEFT_UNIT_LABEL_H = 25;\r
-static constexpr uint16_t RIGHT_VALUE_LABEL_X = 227;\r
-static constexpr uint16_t RIGHT_VALUE_LABEL_Y = 212;\r
-static constexpr uint16_t RIGHT_VALUE_LABEL_W = 175;\r
-static constexpr uint16_t RIGHT_VALUE_LABEL_H = 56;\r
-static constexpr uint16_t RIGHT_UNIT_LABEL_X = 227;\r
-static constexpr uint16_t RIGHT_UNIT_LABEL_Y = 272;\r
-static constexpr uint16_t RIGHT_UNIT_LABEL_W = 175;\r
-static constexpr uint16_t RIGHT_UNIT_LABEL_H = 25;\r
-static constexpr uint16_t BOTTOM_VALUE_LABEL_X = 120;\r
-static constexpr uint16_t BOTTOM_VALUE_LABEL_Y = 309;\r
-static constexpr uint16_t BOTTOM_VALUE_LABEL_W = 221;\r
-static constexpr uint16_t BOTTOM_VALUE_LABEL_H = 56;\r
-static constexpr uint16_t BOTTOM_UNIT_LABEL_X = 205;\r
-static constexpr uint16_t BOTTOM_UNIT_LABEL_Y = 369;\r
-static constexpr uint16_t BOTTOM_UNIT_LABEL_W = 50;\r
-static constexpr uint16_t BOTTOM_UNIT_LABEL_H = 25;\r
-static constexpr uint16_t SEP_LINE_X = 225;\r
-static constexpr uint16_t SEP_LINE_Y = 220;\r
-static constexpr uint16_t SEP_LINE_W = 2;\r
-static constexpr uint16_t SEP_LINE_H = 80;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_DATA, SportDataPage, false);\r
-\r
-void SportDataPage::SportDataAnimatorCallback::Callback(UIView *view)\r
-{\r
-    UNUSED(view);\r
-\r
-    uint16_t heartRate = SportModel::GetInstance().GetHeartRate();\r
-    if (heartRate < HEARTBEAT_MIN) {\r
-        heartRate = HEARTBEAT_BASE2;\r
-    } else if (heartRate < HEARTBEAT_MID) {\r
-        heartRate = (heartRate - HEARTBEAT_MIN) * HEARTBEAT_CONVERT_UNIT + HEARTBEAT_BASE2;\r
-    } else if (heartRate < HEARTBEAT_MAX) {\r
-        heartRate = (heartRate - HEARTBEAT_MID) * HEARTBEAT_CONVERT_UNIT;\r
-    } else {\r
-        heartRate = HEARTBEAT_BASE1;\r
-    }\r
-    page_->sweepClock_->SetSweepTime24Hour(0, 0, heartRate);\r
-    page_->sweepClock_->Invalidate();\r
-\r
-    std::string currTime = GetCurrentTimeStr();\r
-    page_->timeLabel_->SetText(currTime.c_str());\r
-    page_->timeLabel_->Invalidate();\r
-\r
-    uint8_t battery = SettingPowerModel::GetInstance().GetBatteryPowerLevel();\r
-    page_->batteryLabel_->SetText(std::to_string(battery).c_str());\r
-    page_->batteryLabel_->Invalidate();\r
-\r
-    if (battery < BATTERY_LEVEL1) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY1);\r
-    } else if (battery < BATTERY_LEVEL2) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY2);\r
-    } else if (battery < BATTERY_LEVEL3) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY3);\r
-    } else if (battery < BATTERY_LEVEL4) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY4);\r
-    } else if (battery <= BATTERY_LEVEL5) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY5);\r
-    }\r
-\r
-    page_->UpdateDataViewByType();\r
-    page_->CheckTarget();\r
-    page_->CheckRemind();\r
-}\r
-\r
-SportDataPage::~SportDataPage()\r
-{\r
-    if (sweepClock_ != nullptr) {\r
-        sweepClock_->RemoveAll();\r
-        delete sweepClock_;\r
-        sweepClock_ = nullptr;\r
-    }\r
-    if (timeLabel_ != nullptr) {\r
-        delete timeLabel_;\r
-        timeLabel_ = nullptr;\r
-    }\r
-    if (batteryIcon_ != nullptr) {\r
-        delete batteryIcon_;\r
-        batteryIcon_ = nullptr;\r
-    }\r
-    if (batteryLabel_ != nullptr) {\r
-        delete batteryLabel_;\r
-        batteryLabel_ = nullptr;\r
-    }\r
-    if (heartRateScale_ != nullptr) {\r
-        delete heartRateScale_;\r
-        heartRateScale_ = nullptr;\r
-    }\r
-    if (heartRatePointer_ != nullptr) {\r
-        delete heartRatePointer_;\r
-        heartRatePointer_ = nullptr;\r
-    }\r
-    if (separateLine_ != nullptr) {\r
-        delete separateLine_;\r
-        separateLine_ = nullptr;\r
-    }\r
-    if (topValueLabel_ != nullptr) {\r
-        delete topValueLabel_;\r
-        topValueLabel_ = nullptr;\r
-    }\r
-    if (topUnitLabel_ != nullptr) {\r
-        delete topUnitLabel_;\r
-        topUnitLabel_ = nullptr;\r
-    }\r
-    if (leftValueLabel_ != nullptr) {\r
-        delete leftValueLabel_;\r
-        leftValueLabel_ = nullptr;\r
-    }\r
-    if (leftUnitLabel_ != nullptr) {\r
-        delete leftUnitLabel_;\r
-        leftUnitLabel_ = nullptr;\r
-    }\r
-    if (rightValueLabel_ != nullptr) {\r
-        delete rightValueLabel_;\r
-        rightValueLabel_ = nullptr;\r
-    }\r
-    if (rightUnitLabel_ != nullptr) {\r
-        delete rightUnitLabel_;\r
-        rightUnitLabel_ = nullptr;\r
-    }\r
-    if (bottomValueLabel_ != nullptr) {\r
-        delete bottomValueLabel_;\r
-        bottomValueLabel_ = nullptr;\r
-    }\r
-    if (bottomUnitLabel_ != nullptr) {\r
-        delete bottomUnitLabel_;\r
-        bottomUnitLabel_ = nullptr;\r
-    }\r
-    if (secondHand_ != nullptr) {\r
-        delete secondHand_;\r
-        secondHand_ = nullptr;\r
-    }\r
-    if (animator_ != nullptr) {\r
-        delete animator_;\r
-        animator_ = nullptr;\r
-    }\r
-    if (callback_ != nullptr) {\r
-        delete callback_;\r
-        callback_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportDataPage::~SportDataPage");\r
-}\r
-\r
-void SportDataPage::InitTimeLableVIew()\r
-{\r
-    timeLabel_ = new UILabel();\r
-    if (timeLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage timeLabel_ new fail");\r
-        return;\r
-    }\r
-    timeLabel_->SetPosition(TIME_LABEL_X, TIME_LABEL_Y, TIME_LABEL_W, TIME_LABEL_H);\r
-    timeLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, TIME_LABEL_FONT);\r
-    timeLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    sweepClock_->Add(timeLabel_);\r
-}\r
-\r
-void SportDataPage::InitBatteryView()\r
-{\r
-    batteryIcon_ = new UIImageView();\r
-    if (batteryIcon_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage batteryIcon_ new fail");\r
-        return;\r
-    }\r
-    batteryIcon_->SetPosition(BATTERY_ICON_X, BATTERY_ICON_Y);\r
-    batteryIcon_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    sweepClock_->Add(batteryIcon_);\r
-\r
-    batteryLabel_ = new UILabel();\r
-    if (batteryLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage batteryLabel_ new fail");\r
-        return;\r
-    }\r
-    batteryLabel_->SetPosition(BATTERY_LABEL_X, BATTERY_LABEL_Y, BATTERY_LABEL_W, BATTERY_LABEL_H);\r
-    batteryLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, BATTERY_LABEL_FONT);\r
-    batteryLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    sweepClock_->Add(batteryLabel_);\r
-}\r
-\r
-void SportDataPage::ShowUpHeartRate()\r
-{\r
-    heartRateScale_ = new UIImageView();\r
-    if (heartRateScale_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage heartRateScale_ new fail");\r
-        return;\r
-    }\r
-    heartRateScale_->SetPosition(0, 0);\r
-    LOADIMG::LoadImageViewImg(heartRateScale_, SPORT_IMAGE, IMAGE_SPORT_SCALE);\r
-    sweepClock_->Add(heartRateScale_);\r
-\r
-    heartRatePointer_ = new UIImageView();\r
-    if (heartRatePointer_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage heartRatePointer_ new fail");\r
-        return;\r
-    }\r
-    heartRatePointer_->SetPosition(HEARTBEAT_IMAGE_X, HEARTBEAT_IMAGE_Y);\r
-    LOADIMG::LoadImageViewImg(heartRatePointer_, SPORT_IMAGE, IMAGE_SPORT_HEART2);\r
-    sweepClock_->Add(heartRatePointer_);\r
-\r
-    SportType sportType = SportModel::GetInstance().GetSportType();\r
-    if (sportType == SPORT_TYPE_CLIMBING) {\r
-        heartRatePointer_->SetVisible(false);\r
-    } else {\r
-        heartRatePointer_->SetVisible(true);\r
-    }\r
-}\r
-\r
-void SportDataPage::ShowUpTopView()\r
-{\r
-    topValueLabel_ = new UILabel();\r
-    if (topValueLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage topValueLabel_ new fail");\r
-        return;\r
-    }\r
-    topValueLabel_->SetPosition(TOP_VALUE_LABEL_X, TOP_VALUE_LABEL_Y, TOP_VALUE_LABEL_W, TOP_VALUE_LABEL_H);\r
-    topValueLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    topValueLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, TOP_VALUE_LABEL_FONT);\r
-    sweepClock_->Add(topValueLabel_);\r
-\r
-    topUnitLabel_ = new UILabel();\r
-    if (topUnitLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage topUnitLabel_ new fail");\r
-        return;\r
-    }\r
-    topUnitLabel_->SetPosition(TOP_UNIT_LABEL_X, TOP_UNIT_LABEL_Y, TOP_UNIT_LABEL_W, TOP_UNIT_LABEL_H);\r
-    topUnitLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    topUnitLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, UNIT_LABEL_FONT);\r
-    sweepClock_->Add(topUnitLabel_);\r
-}\r
-\r
-void SportDataPage::ShowUpLeftView()\r
-{\r
-    leftValueLabel_ = new UILabel();\r
-    if (leftValueLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage leftValueLabel_ new fail");\r
-        return;\r
-    }\r
-    leftValueLabel_->SetPosition(LEFT_VALUE_LABEL_X, LEFT_VALUE_LABEL_Y, LEFT_VALUE_LABEL_W, LEFT_VALUE_LABEL_H);\r
-    leftValueLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    leftValueLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, VALUE_LABEL_FONT);\r
-    sweepClock_->Add(leftValueLabel_);\r
-\r
-    leftUnitLabel_ = new UILabel();\r
-    if (leftUnitLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage leftUnitLabel_ new fail");\r
-        return;\r
-    }\r
-    leftUnitLabel_->SetPosition(LEFT_UNIT_LABEL_X, LEFT_UNIT_LABEL_Y, LEFT_UNIT_LABEL_W, LEFT_UNIT_LABEL_H);\r
-    leftUnitLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    leftUnitLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, UNIT_LABEL_FONT);\r
-    sweepClock_->Add(leftUnitLabel_);\r
-}\r
-\r
-void SportDataPage::ShowUpRightView()\r
-{\r
-    rightValueLabel_ = new UILabel();\r
-    if (rightValueLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage rightValueLabel_ new fail");\r
-        return;\r
-    }\r
-    rightValueLabel_->SetPosition(RIGHT_VALUE_LABEL_X, RIGHT_VALUE_LABEL_Y, RIGHT_VALUE_LABEL_W, RIGHT_VALUE_LABEL_H);\r
-    rightValueLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    rightValueLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, VALUE_LABEL_FONT);\r
-    sweepClock_->Add(rightValueLabel_);\r
-\r
-    rightUnitLabel_ = new UILabel();\r
-    if (rightUnitLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage rightUnitLabel_ new fail");\r
-        return;\r
-    }\r
-    rightUnitLabel_->SetPosition(RIGHT_UNIT_LABEL_X, RIGHT_UNIT_LABEL_Y, RIGHT_UNIT_LABEL_W, RIGHT_UNIT_LABEL_H);\r
-    rightUnitLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    rightUnitLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, UNIT_LABEL_FONT);\r
-    sweepClock_->Add(rightUnitLabel_);\r
-}\r
-\r
-void SportDataPage::ShowUpBottomView()\r
-{\r
-    bottomValueLabel_ = new UILabel();\r
-    if (bottomValueLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage bottomValueLabel_ new fail");\r
-        return;\r
-    }\r
-    bottomValueLabel_->SetPosition(BOTTOM_VALUE_LABEL_X, BOTTOM_VALUE_LABEL_Y, BOTTOM_VALUE_LABEL_W,\r
-                                   BOTTOM_VALUE_LABEL_H);\r
-    bottomValueLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    bottomValueLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, VALUE_LABEL_FONT);\r
-    sweepClock_->Add(bottomValueLabel_);\r
-\r
-    bottomUnitLabel_ = new UILabel();\r
-    if (bottomUnitLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage bottomUnitLabel_ new fail");\r
-        return;\r
-    }\r
-    bottomUnitLabel_->SetPosition(BOTTOM_UNIT_LABEL_X, BOTTOM_UNIT_LABEL_Y, BOTTOM_UNIT_LABEL_W, BOTTOM_UNIT_LABEL_H);\r
-    bottomUnitLabel_->SetText("时间");\r
-    bottomUnitLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    bottomUnitLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, UNIT_LABEL_FONT);\r
-    sweepClock_->Add(bottomUnitLabel_);\r
-}\r
-\r
-void SportDataPage::ShowUpSeparateLine()\r
-{\r
-    separateLine_ = new UICanvas();\r
-    if (separateLine_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage ShowUpSeparateLine new fail");\r
-        return;\r
-    }\r
-    separateLine_->SetPosition(SEP_LINE_X, SEP_LINE_Y, SEP_LINE_W, SEP_LINE_H);\r
-    separateLine_->SetStyle(STYLE_BACKGROUND_COLOR, Color::Gray().full);\r
-    sweepClock_->Add(separateLine_);\r
-}\r
-\r
-void SportDataPage::OnStart(void *data)\r
-{\r
-    sweepClock_ = new UISweepClock();\r
-    if (sweepClock_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage sweepClock_ new fail");\r
-        return;\r
-    }\r
-    sweepClock_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    sweepClock_->SetOnDragListener(this);\r
-    sweepClock_->SetDraggable(true);\r
-    sweepClock_->SetTouchable(true);\r
-\r
-    secondHand_ = new Image();\r
-    if (secondHand_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "secondHand new fail");\r
-        return;\r
-    }\r
-    LOADIMG::LoadImageImg(secondHand_, SPORT_IMAGE, IMAGE_SPORT_TRIANGLE);\r
-    sweepClock_->SetHandImage(UISweepClock::HandType::SECOND_HAND, *secondHand_,\r
-                              {HAND_POSITION_XPOS, HAND_POSITION_YPOS}, {HAND_CENTER_XPOS, HAND_CENTER_YPOS});\r
-    sweepClock_->SetHandLine(UISweepClock::HandType::HOUR_HAND, {HAND_POSITION_XPOS, HAND_POSITION_YPOS},\r
-                             {HAND_CENTER_XPOS, HAND_CENTER_YPOS}, Color::White(), HAND_WIDTH, HAND_HEIGHT,\r
-                             OPA_TRANSPARENT);\r
-    sweepClock_->SetHandLine(UISweepClock::HandType::MINUTE_HAND, {HAND_POSITION_XPOS, HAND_POSITION_YPOS},\r
-                             {HAND_CENTER_XPOS, HAND_CENTER_YPOS}, Color::White(), HAND_WIDTH, HAND_HEIGHT,\r
-                             OPA_TRANSPARENT);\r
-    sweepClock_->SetWorkMode(UISweepClock::WorkMode::NORMAL);\r
-\r
-    ShowUpHeartRate();\r
-    InitTimeLableVIew();\r
-    InitBatteryView();\r
-    ShowUpTopView();\r
-    ShowUpLeftView();\r
-    ShowUpRightView();\r
-    ShowUpBottomView();\r
-    ShowUpSeparateLine();\r
-    AddViewToPageContainer(sweepClock_);\r
-\r
-    callback_ = new SportDataAnimatorCallback(this);\r
-    if (callback_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage::OnStart callback_ new fail");\r
-        return;\r
-    }\r
-\r
-    animator_ = new Animator(callback_, nullptr, 0, true);\r
-    if (animator_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportDataPage::OnStart new Animator animator_ fail");\r
-        return;\r
-    }\r
-}\r
-\r
-void SportDataPage::OnPause()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() != Animator::STOP) {\r
-            animator_->Stop();\r
-        }\r
-    }\r
-}\r
-\r
-void SportDataPage::OnResume()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() == Animator::STOP) {\r
-            animator_->Start();\r
-        }\r
-    }\r
-}\r
-\r
-bool SportDataPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        SportModel::GetInstance().PauseAndReport(true);\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_PAUSE,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportDataPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    return false;\r
-}\r
-\r
-void SportDataPage::UpdateDataViewByType()\r
-{\r
-    uint32_t elapsedTime = SportModel::GetInstance().GetElapsedTime();\r
-    std::string sportTimeStr = FormatSportTime(elapsedTime);\r
-    bottomValueLabel_->SetText(sportTimeStr.c_str());\r
-\r
-    SportType sportType = SportModel::GetInstance().GetSportType();\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetSportInfo(sportType);\r
-    if (sportType == SPORT_TYPE_OUTDOOR_RUNNING) {\r
-        topValueLabel_->SetText(std::to_string(sportInfo->data.heartRate).c_str());\r
-        topUnitLabel_->SetText("心率(次/分钟)");\r
-        leftValueLabel_->SetText(CalculateSpeed(sportInfo->data.distance, elapsedTime).c_str());\r
-        leftUnitLabel_->SetText("配速(/km)");\r
-        rightValueLabel_->SetText(ConvertDistance(sportInfo->data.distance).c_str());\r
-        rightUnitLabel_->SetText("距离(km)");\r
-    } else if (sportType == SPORT_TYPE_INDOOR_RUNNING) {\r
-        topValueLabel_->SetText(std::to_string(sportInfo->data.heartRate).c_str());\r
-        topUnitLabel_->SetText("心率(次/分钟)");\r
-        leftValueLabel_->SetText(CalculateSpeed(sportInfo->data.distance, elapsedTime).c_str());\r
-        leftUnitLabel_->SetText("配速(/km)");\r
-        rightValueLabel_->SetText(ConvertDistance(sportInfo->data.distance).c_str());\r
-        rightUnitLabel_->SetText("距离(km)");\r
-    } else if (sportType == SPORT_TYPE_CYCLING) {\r
-        topValueLabel_->SetText(std::to_string(sportInfo->data.heartRate).c_str());\r
-        topUnitLabel_->SetText("心率(次/分钟)");\r
-        leftValueLabel_->SetText(CalculateSpeed(sportInfo->data.distance, elapsedTime).c_str());\r
-        leftUnitLabel_->SetText("配速(/km)");\r
-        rightValueLabel_->SetText(ConvertDistance(sportInfo->data.distance).c_str());\r
-        rightUnitLabel_->SetText("距离(km)");\r
-    } else if (sportType == SPORT_TYPE_CLIMBING) {\r
-        topValueLabel_->SetText(std::to_string(sportInfo->data.altitude).c_str());\r
-        topUnitLabel_->SetText("海拔(m)");\r
-        leftValueLabel_->SetText(std::to_string(sportInfo->data.ascent).c_str());\r
-        leftUnitLabel_->SetText("累计上升(m)");\r
-        rightValueLabel_->SetText(std::to_string(sportInfo->data.descent).c_str());\r
-        rightUnitLabel_->SetText("累计下降(m)");\r
-    } else if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-        topValueLabel_->SetText(std::to_string(sportInfo->data.heartRate).c_str());\r
-        topUnitLabel_->SetText("心率(次/分钟)");\r
-        leftValueLabel_->SetText(std::to_string(sportInfo->data.calorie).c_str());\r
-        leftUnitLabel_->SetText("热量(kcal)");\r
-        rightValueLabel_->SetText(ConvertDistance(sportInfo->data.distance).c_str());\r
-        rightUnitLabel_->SetText("距离(km)");\r
-    } else if (sportType == SPORT_TYPE_OUTDOOR_SWIMMING) {\r
-        topValueLabel_->SetText(std::to_string(sportInfo->data.heartRate).c_str());\r
-        topUnitLabel_->SetText("心率(次/分钟)");\r
-        leftValueLabel_->SetText(std::to_string(sportInfo->data.calorie).c_str());\r
-        leftUnitLabel_->SetText("热量(kcal)");\r
-        rightValueLabel_->SetText(ConvertDistance(sportInfo->data.distance).c_str());\r
-        rightUnitLabel_->SetText("距离(km)");\r
-    }\r
-}\r
-\r
-void SportDataPage::CheckTarget()\r
-{\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (!sportInfo->isTargetSetted) {\r
-        return;\r
-    }\r
-    if (sportInfo->targetType == SPORT_TARGET_DISTANCE) {\r
-        SportType sportType = SportModel::GetInstance().GetSportType();\r
-        if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-            if (!sportInfo->targetComplete && sportInfo->data.lap >= sportInfo->targetValue) {\r
-                sportInfo->targetComplete = true;\r
-                sportInfo->promptType = SPORT_SET_TYPE_TARGET;\r
-                NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-            } else if (!sportInfo->targetHalf && sportInfo->data.lap >= sportInfo->targetValue / TARGET_HALF) {\r
-                sportInfo->targetHalf = true;\r
-                sportInfo->promptType = SPORT_SET_TYPE_TARGET;\r
-                NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-            }\r
-        } else {\r
-            if (!sportInfo->targetComplete && sportInfo->data.distance >= sportInfo->targetValue * NUM_THOUSAND) {\r
-                sportInfo->targetComplete = true;\r
-                sportInfo->promptType = SPORT_SET_TYPE_TARGET;\r
-                NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-            } else if (!sportInfo->targetHalf &&\r
-                       sportInfo->data.distance >= sportInfo->targetValue * NUM_THOUSAND / TARGET_HALF) {\r
-                sportInfo->targetHalf = true;\r
-                sportInfo->promptType = SPORT_SET_TYPE_TARGET;\r
-                NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-            }\r
-        }\r
-    } else if (sportInfo->targetType == SPORT_TARGET_TIME) {\r
-        uint32_t elapsedTime = SportModel::GetInstance().GetElapsedTime();\r
-        if (!sportInfo->targetComplete && elapsedTime >= sportInfo->targetValue * UNIT_SECS_PER_MIN) {\r
-            sportInfo->targetComplete = true;\r
-            sportInfo->promptType = SPORT_SET_TYPE_TARGET;\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-        } else if (!sportInfo->targetHalf && elapsedTime >= sportInfo->targetValue * UNIT_SECS_PER_MIN / TARGET_HALF) {\r
-            sportInfo->targetHalf = true;\r
-            sportInfo->promptType = SPORT_SET_TYPE_TARGET;\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-        }\r
-    } else if (sportInfo->targetType == SPORT_TARGET_CALORIE) {\r
-        if (!sportInfo->targetComplete && sportInfo->data.calorie >= sportInfo->targetValue) {\r
-            sportInfo->targetComplete = true;\r
-            sportInfo->promptType = SPORT_SET_TYPE_TARGET;\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-        } else if (!sportInfo->targetHalf && sportInfo->data.calorie >= sportInfo->targetValue / TARGET_HALF) {\r
-            sportInfo->targetHalf = true;\r
-            sportInfo->promptType = SPORT_SET_TYPE_TARGET;\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-        }\r
-    }\r
-}\r
-\r
-void SportDataPage::CheckRemind()\r
-{\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (sportInfo->enableHeartRemind) {\r
-        if (sportInfo->data.heartRate >= GetHeartRateRangeBounder(sportInfo->heartRange) &&\r
-            sportInfo->data.heartRate < GetHeartRateRangeBounder(sportInfo->heartRange + NUM_ONE)) {\r
-            if (!sportInfo->isHeartReminded) {\r
-                sportInfo->isHeartReminded = true;\r
-                sportInfo->promptType = SPORT_SET_TYPE_HEARTRATE;\r
-                NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-            }\r
-        } else {\r
-            sportInfo->isHeartReminded = false;\r
-        }\r
-    }\r
-\r
-    if (sportInfo->remindType == SPORT_REMIND_INTERVAL_NONE || !sportInfo->isRemindSetted) {\r
-        return;\r
-    } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_DISTANCE) {\r
-        SportType sportType = SportModel::GetInstance().GetSportType();\r
-        if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-            if (sportInfo->data.lap >= (sportInfo->remindTimes + NUM_ONE) * sportInfo->remindValue) {\r
-                sportInfo->remindTimes++;\r
-                sportInfo->promptType = SPORT_SET_TYPE_REMIND;\r
-                NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-            }\r
-        } else {\r
-            if (sportInfo->data.distance >=\r
-                (sportInfo->remindTimes + NUM_ONE) * sportInfo->remindValue * NUM_THOUSAND) {\r
-                sportInfo->remindTimes++;\r
-                sportInfo->promptType = SPORT_SET_TYPE_REMIND;\r
-                NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-            }\r
-        }\r
-    } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_TIME) {\r
-        uint32_t elapsedTime = SportModel::GetInstance().GetElapsedTime();\r
-        if (elapsedTime >= (sportInfo->remindTimes + NUM_ONE) * sportInfo->remindValue * UNIT_SECS_PER_MIN) {\r
-            sportInfo->remindTimes++;\r
-            sportInfo->promptType = SPORT_SET_TYPE_REMIND;\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_PROMPT,\r
-                    TransitionType::TRANSITION_INVALID, false);\r
-        }\r
-    }\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportHeartRateRangeItemView.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportHeartRateRangeItemView.cpp
deleted file mode 100644 (file)
index a516c15..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportHeartRateRangeItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "sport/SportModel.h"\r
-#include "sport/SportHeartRateRangeItemView.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t BG_X = 0;\r
-static constexpr uint16_t BG_Y = 6;\r
-static constexpr uint16_t TITLE_X = 39;\r
-static constexpr uint16_t TITLE_Y = 17;\r
-static constexpr uint16_t TITLE_W = 200;\r
-static constexpr uint16_t TITLE_H = 29;\r
-static constexpr uint16_t TITLE_FONT = 24;\r
-static constexpr uint16_t RANGE_X = 39;\r
-static constexpr uint16_t RANGE_Y = 50;\r
-static constexpr uint16_t RANGE_W = 264;\r
-static constexpr uint16_t RANGE_H = 39;\r
-static constexpr uint16_t RANGE_FONT = 32;\r
-static constexpr uint16_t BUTTON_X = 350;\r
-static constexpr uint16_t BUTTON_Y = 32;\r
-static constexpr uint16_t BUTTON_W = 44;\r
-static constexpr uint16_t BUTTON_H = 44;\r
-\r
-SportHeartRateRangeItemView::SportHeartRateRangeItemView()\r
-{\r
-    bgImage_.SetPosition(BG_X, BG_Y);\r
-    LOADIMG::LoadImageViewImg(&bgImage_, SPORT_IMAGE, IMAGE_SPORT_ITEMBG);\r
-\r
-    title_.SetPosition(TITLE_X, TITLE_Y, TITLE_W, TITLE_H);\r
-    title_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, TITLE_FONT);\r
-    title_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    title_.SetStyle(STYLE_TEXT_COLOR, Color::Gray().full);\r
-    title_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    range_.SetPosition(RANGE_X, RANGE_Y, RANGE_W, RANGE_H);\r
-    range_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, RANGE_FONT);\r
-    range_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    range_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    button_.SetPosition(BUTTON_X, BUTTON_Y, BUTTON_W, BUTTON_H);\r
-    button_.SetImages(ImageCacheManager::GetInstance().LoadOneInMultiRes(IMAGE_SPORT_RADIO1, SPORT_IMAGE),\r
-                      ImageCacheManager::GetInstance().LoadOneInMultiRes(IMAGE_SPORT_RADIO0, SPORT_IMAGE));\r
-\r
-    Add(&bgImage_);\r
-    Add(&title_);\r
-    Add(&range_);\r
-    Add(&button_);\r
-}\r
-\r
-SportHeartRateRangeItemView::~SportHeartRateRangeItemView()\r
-{\r
-    Remove(&bgImage_);\r
-    Remove(&title_);\r
-    Remove(&range_);\r
-    Remove(&button_);\r
-}\r
-\r
-void SportHeartRateRangeItemView::SetItemInfo(const SportHeartRateRangeItem &itemInfo)\r
-{\r
-    title_.SetText(itemInfo.title);\r
-    range_.SetText(GetHeartRateRangeDescription(itemInfo.itemId));\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (sportInfo->heartRange == itemInfo.itemId) {\r
-        button_.SetState(UICheckBox::UICheckBoxState::SELECTED);\r
-    } else {\r
-        button_.SetState(UICheckBox::UICheckBoxState::UNSELECTED);\r
-    }\r
-    SetViewId(itemInfo.viewId);\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportHeartRateRangePage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportHeartRateRangePage.cpp
deleted file mode 100644 (file)
index 1200835..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportHeartRateRangePage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportPresenter.h"\r
-#include "sport/SportHeartRateRangePage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t LABELS_X = 100;\r
-static constexpr uint16_t LABELS_Y = 38;\r
-static constexpr uint16_t LABELS_W = 253;\r
-static constexpr uint16_t LABELS_H = 53;\r
-static constexpr uint16_t LABELS_FONT = 38;\r
-static constexpr uint16_t LIST_X = 20;\r
-static constexpr uint16_t LIST_Y = 100;\r
-static constexpr uint16_t LIST_W = 415;\r
-static constexpr uint16_t LIST_H = 485;\r
-static constexpr uint16_t LIST_ITEM_W = 415;\r
-static constexpr uint16_t LIST_ITEM_H = 108;\r
-static constexpr uint16_t REBOUND_SIZE = 60;\r
-static constexpr uint16_t TOP_BLANK_SIZE = 38;\r
-static constexpr uint16_t BOTTOM_BLANK_SIZE = 60;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_HEARTRATE_RANGE, SportHeartRateRangePage, false);\r
-\r
-static SportHeartRateRangePage *g_SportHeartRateRangePageInstance = nullptr;\r
-\r
-static UIView *CreateViewCb(uint8_t type)\r
-{\r
-    SportHeartRateRangeItemView *item = new SportHeartRateRangeItemView();\r
-    if (item == nullptr) {\r
-        return nullptr;\r
-    }\r
-    item->SetPosition(0, 0, LIST_ITEM_W, LIST_ITEM_H);\r
-    item->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    item->SetTouchable(true);\r
-    item->SetOnClickListener(g_SportHeartRateRangePageInstance);\r
-    return item;\r
-}\r
-\r
-static void UpdateViewCb(UIView *view, void *data, uint8_t type)\r
-{\r
-    if (view == nullptr || data == nullptr) {\r
-        return;\r
-    }\r
-    SportHeartRateRangeItemView *item = dynamic_cast<SportHeartRateRangeItemView *>(view);\r
-    if (item == nullptr) {\r
-        return;\r
-    }\r
-    SportHeartRateRangeItem *itemInfo = static_cast<SportHeartRateRangeItem *>(data);\r
-    item->SetItemInfo(*itemInfo);\r
-}\r
-\r
-SportHeartRateRangePage::SportHeartRateRangePage()\r
-{\r
-    g_SportHeartRateRangePageInstance = this;\r
-}\r
-\r
-SportHeartRateRangePage::~SportHeartRateRangePage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (titleLabel_ != nullptr) {\r
-        delete titleLabel_;\r
-        titleLabel_ = nullptr;\r
-    }\r
-    if (heartRateRangeList_ != nullptr) {\r
-        delete heartRateRangeList_;\r
-        heartRateRangeList_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportHeartRateRangePage::~SportHeartRateRangePage");\r
-}\r
-\r
-void SportHeartRateRangePage::CreateUILabel()\r
-{\r
-    titleLabel_ = new UILabel();\r
-    if (titleLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportHeartRateRangePage titleLabel_ new fail");\r
-        return;\r
-    }\r
-    titleLabel_->SetPosition(LABELS_X, LABELS_Y, LABELS_W, LABELS_H);\r
-    titleLabel_->SetText("心率范围");\r
-    titleLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleLabel_->SetFont(BOLD_VECTOR_FONT_FILENAME, LABELS_FONT);\r
-    group_->Add(titleLabel_);\r
-}\r
-\r
-void SportHeartRateRangePage::CreateUIList()\r
-{\r
-    heartRateRangeList_ = new UISimpleList();\r
-    if (heartRateRangeList_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportHeartRateRangePage heartRateRangeList_ new fail");\r
-        return;\r
-    }\r
-    heartRateRangeList_->SetPosition(LIST_X, LIST_Y, LIST_W, LIST_H);\r
-    heartRateRangeList_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    heartRateRangeList_->SetBoundaryIntercept(DragEvent::DIRECTION_TOP_TO_BOTTOM, false);\r
-    heartRateRangeList_->SetBoundaryIntercept(DragEvent::DIRECTION_BOTTOM_TO_TOP, false);\r
-\r
-    for (uint8_t i = 0; i < SPORT_HEARTRATE_RANGE_MAX; ++i) {\r
-        Contents content;\r
-        content.createFunc = CreateViewCb;\r
-        content.updateFunc = UpdateViewCb;\r
-        content.type = 0;\r
-        content.data = reinterpret_cast<void *>(&heartRateRanges_[i]);\r
-        heartRateRangeList_->AddContent(content);\r
-    }\r
-    heartRateRangeList_->RefreshList();\r
-    group_->Add(heartRateRangeList_);\r
-}\r
-\r
-void SportHeartRateRangePage::OnStart(void *data)\r
-{\r
-    group_ = new UIScrollView();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportHeartRateRangePage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-    group_->SetReboundSize(REBOUND_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-    group_->SetScrollBlankSize(TOP_BLANK_SIZE, UIAbstractScroll::Direction::TOP);\r
-    group_->SetScrollBlankSize(BOTTOM_BLANK_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-\r
-    CreateUILabel();\r
-    CreateUIList();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportHeartRateRangePage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND_HEARTRATE,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportHeartRateRangePage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (strcmp(view.GetViewId(), SPORT_HEARTRATE_RANGE_ITEM_1) == 0) {\r
-        sportInfo->heartRange = SPORT_HEARTRATE_RANGE_ITEM1;\r
-    } else if (strcmp(view.GetViewId(), SPORT_HEARTRATE_RANGE_ITEM_2) == 0) {\r
-        sportInfo->heartRange = SPORT_HEARTRATE_RANGE_ITEM2;\r
-    } else if (strcmp(view.GetViewId(), SPORT_HEARTRATE_RANGE_ITEM_3) == 0) {\r
-        sportInfo->heartRange = SPORT_HEARTRATE_RANGE_ITEM3;\r
-    } else if (strcmp(view.GetViewId(), SPORT_HEARTRATE_RANGE_ITEM_4) == 0) {\r
-        sportInfo->heartRange = SPORT_HEARTRATE_RANGE_ITEM4;\r
-    }\r
-    heartRateRangeList_->RefreshList();\r
-    SportModel::GetInstance().SaveConfig(SPORT_CONFIG_INFO);\r
-    NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND_HEARTRATE,\r
-        TransitionType::TRANSITION_INVALID, false);\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMenuItemView.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMenuItemView.cpp
deleted file mode 100644 (file)
index f4eb224..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportMenuItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "ui_resource_sport.h"\r
-#include "main/LoadImg.h"\r
-#include "sport/SportMenuItemView.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t BG_X = 0;\r
-static constexpr uint16_t BG_Y = 10;\r
-static constexpr uint16_t ICON_X = 16;\r
-static constexpr uint16_t ICON_Y = 25;\r
-static constexpr uint16_t LABEL_X = 124;\r
-static constexpr uint16_t LABEL_Y = 47;\r
-static constexpr uint16_t LABEL_W = 166;\r
-static constexpr uint16_t LABEL_H = 40;\r
-static constexpr uint16_t LABEL_FONT = 32;\r
-static constexpr uint16_t IMAGE_X = 344;\r
-static constexpr uint16_t IMAGE_Y = 44;\r
-\r
-SportMenuItemView::SportMenuItemView()\r
-{\r
-    bgImage_.SetPosition(BG_X, BG_Y);\r
-\r
-    icon_.SetPosition(ICON_X, ICON_Y);\r
-\r
-    label_.SetPosition(LABEL_X, LABEL_Y, LABEL_W, LABEL_H);\r
-    label_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-    label_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-\r
-    LOADIMG::LoadImageViewImg(&settingImage_, SPORT_IMAGE, IMAGE_SPORT_SETTING);\r
-    settingImage_.SetPosition(IMAGE_X, IMAGE_Y);\r
-\r
-    Add(&bgImage_);\r
-    Add(&icon_);\r
-    Add(&label_);\r
-    Add(&settingImage_);\r
-}\r
-\r
-SportMenuItemView::~SportMenuItemView()\r
-{\r
-    Remove(&bgImage_);\r
-    Remove(&icon_);\r
-    Remove(&label_);\r
-    Remove(&settingImage_);\r
-}\r
-\r
-void SportMenuItemView::SetItemInfo(const SportMenuItem &itemInfo)\r
-{\r
-    LOADIMG::LoadImageViewImg(&bgImage_, SPORT_IMAGE, itemInfo.bgId);\r
-    LOADIMG::LoadImageViewImg(&icon_, SPORT_IMAGE, itemInfo.iconId);\r
-    label_.SetText(itemInfo.label);\r
-    SetViewId(itemInfo.viewId);\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMenuPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMenuPage.cpp
deleted file mode 100644 (file)
index f91d3d6..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportMenuPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportMenuPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t TITLI_LABEL_FONT = 38;\r
-static constexpr uint16_t TITLI_LABEL_X = 100;\r
-static constexpr uint16_t TITLI_LABEL_Y = 38;\r
-static constexpr uint16_t TITLI_LABEL_W = 253;\r
-static constexpr uint16_t TITLI_LABEL_H = 53;\r
-static constexpr uint16_t LIST_X = 19;\r
-static constexpr uint16_t LIST_Y = 108;\r
-static constexpr uint16_t LIST_W = 415;\r
-static constexpr uint16_t LIST_H = 780;\r
-static constexpr uint16_t LIST_ITEM_W = 415;\r
-static constexpr uint16_t LIST_ITEM_H = 129;\r
-static constexpr uint16_t REBOUND_SIZE = 60;\r
-static constexpr uint16_t BLANK_SIZE = 100;\r
-static constexpr uint16_t SETTINGS_START_XPOS = 364;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_MENU, SportMenuPage, true);\r
-\r
-static SportMenuPage *g_SportMenuPageInstance = nullptr;\r
-\r
-static UIView *CreateViewCb(uint8_t type)\r
-{\r
-    SportMenuItemView *item = new SportMenuItemView();\r
-    if (item == nullptr) {\r
-        return nullptr;\r
-    }\r
-    item->SetPosition(0, 0, LIST_ITEM_W, LIST_ITEM_H);\r
-    item->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    item->SetTouchable(true);\r
-    item->SetOnClickListener(g_SportMenuPageInstance);\r
-    return item;\r
-}\r
-\r
-static void UpdateViewCb(UIView *view, void *data, uint8_t type)\r
-{\r
-    if (view == nullptr || data == nullptr) {\r
-        return;\r
-    }\r
-    SportMenuItemView *item = dynamic_cast<SportMenuItemView *>(view);\r
-    if (item == nullptr) {\r
-        return;\r
-    }\r
-    SportMenuItem *itemInfo = static_cast<SportMenuItem *>(data);\r
-    item->SetItemInfo(*itemInfo);\r
-}\r
-\r
-SportMenuPage::SportMenuPage()\r
-{\r
-    g_SportMenuPageInstance = this;\r
-}\r
-\r
-SportMenuPage::~SportMenuPage()\r
-{\r
-    bool ret = ImageCacheManager::GetInstance().UnloadAllInMultiRes(SPORT_IMAGE);\r
-    if (ret == false) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UnloadSportImage fail");\r
-    }\r
-\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (background_ != nullptr) {\r
-        delete background_;\r
-        background_ = nullptr;\r
-    }\r
-    if (titleLabel_ != nullptr) {\r
-        delete titleLabel_;\r
-        titleLabel_ = nullptr;\r
-    }\r
-    if (sportList_ != nullptr) {\r
-        delete sportList_;\r
-        sportList_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportMenuPage::~SportMenuPage");\r
-}\r
-\r
-void SportMenuPage::InitBackgroundView()\r
-{\r
-    background_ = new UIImageView();\r
-    if (background_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMenuPage background_ new fail");\r
-        return;\r
-    }\r
-    background_->SetPosition(0, 0);\r
-    LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG);\r
-    group_->Add(background_);\r
-}\r
-\r
-void SportMenuPage::CreateUILabel()\r
-{\r
-    titleLabel_ = new UILabel();\r
-    if (titleLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMenuPage titleLabel_ new fail");\r
-        return;\r
-    }\r
-\r
-    titleLabel_->SetPosition(TITLI_LABEL_X, TITLI_LABEL_Y, TITLI_LABEL_W, TITLI_LABEL_H);\r
-    titleLabel_->SetText("运动");\r
-    titleLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleLabel_->SetFont(BOLD_VECTOR_FONT_FILENAME, TITLI_LABEL_FONT);\r
-    group_->Add(titleLabel_);\r
-}\r
-\r
-void SportMenuPage::CreateUIList()\r
-{\r
-    sportList_ = new UISimpleList();\r
-    if (sportList_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMenuPage sportList_ new fail");\r
-        return;\r
-    }\r
-\r
-    sportList_->SetPosition(LIST_X, LIST_Y, LIST_W, LIST_H);\r
-    sportList_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    sportList_->SetBoundaryIntercept(DragEvent::DIRECTION_TOP_TO_BOTTOM, false);\r
-    sportList_->SetBoundaryIntercept(DragEvent::DIRECTION_BOTTOM_TO_TOP, false);\r
-\r
-    for (uint8_t i = 0; i < SPORT_TYPE_MAX; ++i) {\r
-        Contents content;\r
-        content.createFunc = CreateViewCb;\r
-        content.updateFunc = UpdateViewCb;\r
-        content.type = 0;\r
-        content.data = reinterpret_cast<void *>(&sportMenu_[i]);\r
-        sportList_->AddContent(content);\r
-    }\r
-    sportList_->RefreshList();\r
-    group_->Add(sportList_);\r
-}\r
-\r
-void SportMenuPage::OnStart(void *data)\r
-{\r
-    bool ret = ImageCacheManager::GetInstance().LoadAllInMultiRes(SPORT_IMAGE);\r
-    if (ret == false) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LoadSportImage fail");\r
-        return;\r
-    }\r
-    group_ = new UIScrollView();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMenuPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-    group_->SetYScrollBarVisible(true);\r
-    group_->SetReboundSize(REBOUND_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-    group_->SetScrollBlankSize(BLANK_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-\r
-    InitBackgroundView();\r
-    CreateUILabel();\r
-    CreateUIList();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportMenuPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().ChangeSliceToApplist();\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportMenuPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), SPORT_ITEM_OUTDOOR_RUNNING) == 0) {\r
-        SportModel::GetInstance().SetSportType(SPORT_TYPE_OUTDOOR_RUNNING);\r
-    } else if (strcmp(view.GetViewId(), SPORT_ITEM_INDOOR_RUNNING) == 0) {\r
-        SportModel::GetInstance().SetSportType(SPORT_TYPE_INDOOR_RUNNING);\r
-    } else if (strcmp(view.GetViewId(), SPORT_ITEM_CYCLING) == 0) {\r
-        SportModel::GetInstance().SetSportType(SPORT_TYPE_CYCLING);\r
-    } else if (strcmp(view.GetViewId(), SPORT_ITEM_CLIMBING) == 0) {\r
-        SportModel::GetInstance().SetSportType(SPORT_TYPE_CLIMBING);\r
-    } else if (strcmp(view.GetViewId(), SPORT_ITEM_INDOOR_SWIMMING) == 0) {\r
-        SportModel::GetInstance().SetSportType(SPORT_TYPE_INDOOR_SWIMMING);\r
-    } else if (strcmp(view.GetViewId(), SPORT_ITEM_OUTDOOR_SWIMMING) == 0) {\r
-        SportModel::GetInstance().SetSportType(SPORT_TYPE_OUTDOOR_SWIMMING);\r
-    }\r
-\r
-    bool isSettingClicked = event.GetCurrentPos().x > SETTINGS_START_XPOS ? true : false;\r
-    if (isSettingClicked) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_SETTINGS,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    } else {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_PREPARE,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMistouchPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportMistouchPage.cpp
deleted file mode 100644 (file)
index f4f8c22..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportMistouchPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "wearable_log.h"\r
-#include "ui_resource_sport.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportMistouchPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t TITLE_X = 100;\r
-static constexpr uint16_t TITLE_Y = 39;\r
-static constexpr uint16_t TITLE_W = 253;\r
-static constexpr uint16_t TITLE_H = 53;\r
-static constexpr uint16_t TITLE_FONT = 38;\r
-static constexpr uint16_t SCREEN_BG_X = 19;\r
-static constexpr uint16_t SCREEN_BG_Y = 107;\r
-static constexpr uint16_t SCREEN_ICON_X = 27;\r
-static constexpr uint16_t SCREEN_ICON_Y = 115;\r
-static constexpr uint16_t SCREEN_TITLE_X = 100;\r
-static constexpr uint16_t SCREEN_TITLE_Y = 134;\r
-static constexpr uint16_t SCREEN_TITLE_W = 222;\r
-static constexpr uint16_t SCREEN_TITLE_H = 39;\r
-static constexpr uint16_t SCREEN_TITLE_FONT = 32;\r
-static constexpr uint16_t SCREEN_BUTTON_X = 323;\r
-static constexpr uint16_t SCREEN_BUTTON_Y = 131;\r
-static constexpr uint16_t SCREEN_BUTTON_W = 82;\r
-static constexpr uint16_t SCREEN_BUTTON_H = 47;\r
-static constexpr uint16_t SCREEN_TEXT_X = 19;\r
-static constexpr uint16_t SCREEN_TEXT_Y = 224;\r
-static constexpr uint16_t SCREEN_TEXT_W = 415;\r
-static constexpr uint16_t SCREEN_TEXT_H = 146;\r
-static constexpr uint16_t SCREEN_TEXT_FONT = 36;\r
-static constexpr uint16_t CROWN_BG_X = 19;\r
-static constexpr uint16_t CROWN_BG_Y = 394;\r
-static constexpr uint16_t CROWN_ICON_X = 27;\r
-static constexpr uint16_t CROWN_ICON_Y = 402;\r
-static constexpr uint16_t CROWN_TITLE_X = 100;\r
-static constexpr uint16_t CROWN_TITLE_Y = 421;\r
-static constexpr uint16_t CROWN_TITLE_W = 222;\r
-static constexpr uint16_t CROWN_TITLE_H = 39;\r
-static constexpr uint16_t CROWN_TITLE_FONT = 32;\r
-static constexpr uint16_t CROWN_BUTTON_X = 323;\r
-static constexpr uint16_t CROWN_BUTTON_Y = 417;\r
-static constexpr uint16_t CROWN_BUTTON_W = 82;\r
-static constexpr uint16_t CROWN_BUTTON_H = 47;\r
-static constexpr uint16_t CROWN_TEXT_X = 19;\r
-static constexpr uint16_t CROWN_TEXT_Y = 510;\r
-static constexpr uint16_t CROWN_TEXT_W = 415;\r
-static constexpr uint16_t CROWN_TEXT_H = 146;\r
-static constexpr uint16_t CROWN_TEXT_FONT = 36;\r
-static constexpr uint16_t REBOUND_SIZE = 60;\r
-static constexpr uint16_t TOP_BLANK_SIZE = 36;\r
-static constexpr uint16_t BOTTOM_BLANK_SIZE = 100;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_MISTOUCH, SportMistouchPage, false);\r
-\r
-SportMistouchPage::~SportMistouchPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (title_ != nullptr) {\r
-        delete title_;\r
-        title_ = nullptr;\r
-    }\r
-    if (bgScreen_ != nullptr) {\r
-        delete bgScreen_;\r
-        bgScreen_ = nullptr;\r
-    }\r
-    if (imageScreen_ != nullptr) {\r
-        delete imageScreen_;\r
-        imageScreen_ = nullptr;\r
-    }\r
-    if (titleScreen_ != nullptr) {\r
-        delete titleScreen_;\r
-        titleScreen_ = nullptr;\r
-    }\r
-    if (buttonScreen_ != nullptr) {\r
-        delete buttonScreen_;\r
-        buttonScreen_ = nullptr;\r
-    }\r
-    if (textScreen_ != nullptr) {\r
-        delete textScreen_;\r
-        textScreen_ = nullptr;\r
-    }\r
-    if (bgCrown_ != nullptr) {\r
-        delete bgCrown_;\r
-        bgCrown_ = nullptr;\r
-    }\r
-    if (imageCrown_ != nullptr) {\r
-        delete imageCrown_;\r
-        imageCrown_ = nullptr;\r
-    }\r
-    if (titleCrown_ != nullptr) {\r
-        delete titleCrown_;\r
-        titleCrown_ = nullptr;\r
-    }\r
-    if (buttonCrown_ != nullptr) {\r
-        delete buttonCrown_;\r
-        buttonCrown_ = nullptr;\r
-    }\r
-    if (textCrown_ != nullptr) {\r
-        delete textCrown_;\r
-        textCrown_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportMistouchPage::~SportMistouchPage");\r
-}\r
-\r
-void SportMistouchPage::OnStart(void *data)\r
-{\r
-    group_ = new UIScrollView();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-    group_->SetElastic(true);\r
-    group_->SetYScrollBarVisible(true);\r
-    group_->SetReboundSize(REBOUND_SIZE);\r
-    group_->SetScrollBlankSize(TOP_BLANK_SIZE, UIAbstractScroll::Direction::TOP);\r
-    group_->SetScrollBlankSize(BOTTOM_BLANK_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-\r
-    title_ = new UILabel();\r
-    if (title_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage title_ new fail");\r
-        return;\r
-    }\r
-    title_->SetPosition(TITLE_X, TITLE_Y, TITLE_W, TITLE_H);\r
-    title_->SetText("运动防误触");\r
-    title_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    title_->SetFont(BOLD_VECTOR_FONT_FILENAME, TITLE_FONT);\r
-    group_->Add(title_);\r
-\r
-    bgScreen_ = new UIImageView();\r
-    if (bgScreen_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage bgScreen_ new fail");\r
-        return;\r
-    }\r
-    bgScreen_->SetPosition(SCREEN_BG_X, SCREEN_BG_Y);\r
-    LOADIMG::LoadImageViewImg(bgScreen_, SPORT_IMAGE, IMAGE_SPORT_ITEMBG);\r
-    group_->Add(bgScreen_);\r
-\r
-    buttonScreen_ = new UIToggleButton();\r
-    if (buttonScreen_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage buttonScreen_ new fail");\r
-        return;\r
-    }\r
-    buttonScreen_->SetPosition(SCREEN_BUTTON_X, SCREEN_BUTTON_Y, SCREEN_BUTTON_W, SCREEN_BUTTON_H);\r
-    buttonScreen_->SetViewId(SPORT_MISTOUCH_SCREEN_BUTTON);\r
-    buttonScreen_->SetImages(ImageCacheManager::GetInstance().LoadOneInMultiRes(IMAGE_SPORT_TOGGLE1, SPORT_IMAGE),\r
-                             ImageCacheManager::GetInstance().LoadOneInMultiRes(IMAGE_SPORT_TOGGLE0, SPORT_IMAGE));\r
-    buttonScreen_->SetState(false);\r
-    buttonScreen_->SetOnClickListener(this);\r
-    group_->Add(buttonScreen_);\r
-\r
-    titleScreen_ = new UILabel();\r
-    if (titleScreen_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage titleScreen_ new fail");\r
-        return;\r
-    }\r
-    titleScreen_->SetPosition(SCREEN_TITLE_X, SCREEN_TITLE_Y, SCREEN_TITLE_W, SCREEN_TITLE_H);\r
-    titleScreen_->SetText("自动锁定屏幕");\r
-    titleScreen_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleScreen_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, SCREEN_TITLE_FONT);\r
-    group_->Add(titleScreen_);\r
-\r
-    imageScreen_ = new UIImageView();\r
-    if (imageScreen_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage imageScreen_ new fail");\r
-        return;\r
-    }\r
-    imageScreen_->SetPosition(SCREEN_ICON_X, SCREEN_ICON_Y);\r
-    LOADIMG::LoadImageViewImg(imageScreen_, SPORT_IMAGE, IMAGE_SPORT_SCREEN);\r
-    group_->Add(imageScreen_);\r
-\r
-    textScreen_ = new UILabel();\r
-    if (textScreen_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage textScreen_ new fail");\r
-        return;\r
-    }\r
-    textScreen_->SetPosition(SCREEN_TEXT_X, SCREEN_TEXT_Y, SCREEN_TEXT_W, SCREEN_TEXT_H);\r
-    textScreen_->SetText("开启后,运动中熄屏将自动锁定屏幕触摸功能,长按表冠可解锁。");\r
-    textScreen_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);\r
-    textScreen_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    textScreen_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, SCREEN_TEXT_FONT);\r
-    group_->Add(textScreen_);\r
-\r
-    bgCrown_ = new UIImageView();\r
-    if (bgCrown_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage bgCrown_ new fail");\r
-        return;\r
-    }\r
-    bgCrown_->SetPosition(CROWN_BG_X, CROWN_BG_Y);\r
-    LOADIMG::LoadImageViewImg(bgCrown_, SPORT_IMAGE, IMAGE_SPORT_ITEMBG);\r
-    group_->Add(bgCrown_);\r
-\r
-    buttonCrown_ = new UIToggleButton();\r
-    if (buttonCrown_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage buttonCrown_ new fail");\r
-        return;\r
-    }\r
-    buttonCrown_->SetPosition(CROWN_BUTTON_X, CROWN_BUTTON_Y, CROWN_BUTTON_W, CROWN_BUTTON_H);\r
-    buttonCrown_->SetViewId(SPORT_MISTOUCH_CROWN_BUTTON);\r
-    buttonCrown_->SetImages(ImageCacheManager::GetInstance().LoadOneInMultiRes(IMAGE_SPORT_TOGGLE1, SPORT_IMAGE),\r
-                            ImageCacheManager::GetInstance().LoadOneInMultiRes(IMAGE_SPORT_TOGGLE0, SPORT_IMAGE));\r
-    buttonCrown_->SetState(false);\r
-    buttonCrown_->SetOnClickListener(this);\r
-    group_->Add(buttonCrown_);\r
-\r
-    titleCrown_ = new UILabel();\r
-    if (titleCrown_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage titleCrown_ new fail");\r
-        return;\r
-    }\r
-    titleCrown_->SetPosition(CROWN_TITLE_X, CROWN_TITLE_Y, CROWN_TITLE_W, CROWN_TITLE_H);\r
-    titleCrown_->SetText("自动锁定表冠");\r
-    titleCrown_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleCrown_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, CROWN_TITLE_FONT);\r
-    group_->Add(titleCrown_);\r
-\r
-    imageCrown_ = new UIImageView();\r
-    if (imageCrown_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage imageCrown_ new fail");\r
-        return;\r
-    }\r
-    imageCrown_->SetPosition(CROWN_ICON_X, CROWN_ICON_Y);\r
-    LOADIMG::LoadImageViewImg(imageCrown_, SPORT_IMAGE, IMAGE_SPORT_CROWN);\r
-    group_->Add(imageCrown_);\r
-\r
-    textCrown_ = new UILabel();\r
-    if (textCrown_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportMistouchPage textCrown_ new fail");\r
-        return;\r
-    }\r
-    textCrown_->SetPosition(CROWN_TEXT_X, CROWN_TEXT_Y, CROWN_TEXT_W, CROWN_TEXT_H);\r
-    textCrown_->SetText("开启后,运动中熄屏将自动锁定表冠点按、旋钮功能,长按表冠可解锁。");\r
-    textCrown_->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);\r
-    textCrown_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    textCrown_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, CROWN_TEXT_FONT);\r
-    group_->Add(textCrown_);\r
-\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportMistouchPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_SETTINGS,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportMistouchPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), SPORT_MISTOUCH_SCREEN_BUTTON) == 0) {\r
-        // 暂不支持\r
-    } else if (strcmp(view.GetViewId(), SPORT_MISTOUCH_CROWN_BUTTON) == 0) {\r
-        // 暂不支持\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportModel.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportModel.cpp
deleted file mode 100644 (file)
index a9c54bf..0000000
+++ /dev/null
@@ -1,495 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportModel\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include <fstream>\r
-#include <string>\r
-#include <sys/time.h>\r
-#include "wearable_log.h"\r
-#include "msg_center_device.h"\r
-#ifdef BUILD_IN_LINUX\r
-#include "localtime.h"\r
-#endif\r
-#include "sport/SportModel.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t NUM_TEN = 10;\r
-static constexpr uint16_t NUM_HUNDRED = 100;\r
-static constexpr uint16_t NUM_THOUSAND = 1000;\r
-static constexpr uint16_t UNIT_SECS_PER_MIN = 60;\r
-static constexpr uint16_t UNIT_SECS_PER_HOUR = 3600;\r
-static const uint16_t COUNT_TIMES = 100;\r
-static const uint16_t DISTANCE_RANGE = 200;\r
-static const uint16_t HEARTRATE_MIN_VALUE = 116;\r
-static const uint16_t HEARTRATE_MAX_VALUE = 195;\r
-static const uint16_t CALORIE_RANGE = 8;\r
-static const uint16_t ALTITUDE_RANGE = 4;\r
-static const uint16_t ASCENT_RANGE = 7;\r
-static const uint16_t DESCENT_RANGE = 6;\r
-static const uint16_t g_targetDistanceValues[] = {1, 3, 5, 7, 10, 15, 20, 25, 30, 40};  // 距离Picker值集,单位为km\r
-static const uint16_t g_targetTimeValues[] = {10, 20, 30, 60, 120, 180, 200};  // 时间Picker值集,单位为分钟\r
-static const uint16_t g_targetCalorieValues[] = {100, 200, 300, 500, 600, 800, 1000};  // 热量Picker值集,单位为千卡\r
-static const uint16_t g_targetLapValues[] = {1, 2, 4, 6, 8, 10, 12, 16, 20, 30};  // 室内游泳趟数Picker值集,单位为趟\r
-static const char *g_remindHeartRateRange[] = {"116-136次/分", "136-156次/分", "156-176次/分", "176-195次/分"};\r
-static const uint16_t g_heartRateRangeBounder[] = {116, 136, 156, 176, 195};\r
-static const char *SPORT_INFO_FILE = SPORT_CONFIG_PATH "sport_info.dat";\r
-static const char *SPORT_RECORD_FILE = SPORT_CONFIG_PATH "sport_record.dat";\r
-\r
-std::string GetCurrentTimeStr()\r
-{\r
-    struct tm localTime;\r
-    time_t seconds = time(nullptr);\r
-    localtime_r(&seconds, &localTime);\r
-    std::string currTime;\r
-    if (localTime.tm_hour < NUM_TEN) {\r
-        currTime += "0";\r
-    }\r
-    currTime += std::to_string(localTime.tm_hour) + ":";\r
-    if (localTime.tm_min < NUM_TEN) {\r
-        currTime += "0";\r
-    }\r
-    currTime += std::to_string(localTime.tm_min);\r
-    return currTime;\r
-}\r
-\r
-std::string ConvertDistance(uint32_t distance)\r
-{\r
-    std::string distanceStr;\r
-    uint32_t distanceIntPart = distance / NUM_THOUSAND;\r
-    uint32_t distanceFractionalPart = (distance % NUM_THOUSAND) / NUM_TEN;\r
-    if (distanceIntPart > NUM_HUNDRED) {\r
-        distanceStr = std::to_string(distanceIntPart);\r
-    } else if (distanceIntPart > NUM_TEN) {\r
-        distanceStr = std::to_string(distanceIntPart) + "." + std::to_string(distanceFractionalPart / NUM_TEN);\r
-    } else {\r
-        if (distanceFractionalPart < NUM_TEN) {\r
-            distanceStr = std::to_string(distanceIntPart) + ".0" + std::to_string(distanceFractionalPart);\r
-        } else {\r
-            distanceStr = std::to_string(distanceIntPart) + "." + std::to_string(distanceFractionalPart);\r
-        }\r
-    }\r
-    return distanceStr;\r
-}\r
-\r
-std::string FormatSportTime(uint32_t uiSportTime)\r
-{\r
-    std::string strSportTime;\r
-    std::string hours;\r
-    std::string minute;\r
-    std::string seconds;\r
-    uint32_t hour = uiSportTime / UNIT_SECS_PER_HOUR;\r
-    uiSportTime %= UNIT_SECS_PER_HOUR;\r
-    uint32_t min = uiSportTime / UNIT_SECS_PER_MIN;\r
-    uiSportTime %= UNIT_SECS_PER_MIN;\r
-    uint32_t sec = uiSportTime;\r
-    if (hour >= 0 && hour < NUM_TEN) {\r
-        hours = "0" + std::to_string(hour);\r
-    } else {\r
-        hours = std::to_string(hour);\r
-    }\r
-    if (min >= 0 && min < NUM_TEN) {\r
-        minute = "0" + std::to_string(min);\r
-    } else {\r
-        minute = std::to_string(min);\r
-    }\r
-    if (sec >= 0 && sec < NUM_TEN) {\r
-        seconds = "0" + std::to_string(sec);\r
-    } else {\r
-        seconds = std::to_string(sec);\r
-    }\r
-    strSportTime = hours + ":" + minute + ":" + seconds;\r
-    return strSportTime;\r
-}\r
-\r
-std::string CalculateSpeed(uint32_t distance, uint32_t time)\r
-{\r
-    if (distance == 0) {\r
-        return "00'00\"";\r
-    }\r
-    std::string speedStr;\r
-    uint64_t speed = time * NUM_THOUSAND / distance;\r
-    uint64_t min = speed / UNIT_SECS_PER_MIN;\r
-    uint64_t sec = speed % UNIT_SECS_PER_MIN;\r
-    speedStr = std::to_string(min) + "'";\r
-    if (sec >= 0 && sec < NUM_TEN) {\r
-        speedStr += "0";\r
-    }\r
-    speedStr += std::to_string(sec) + "\"";\r
-    return speedStr;\r
-}\r
-\r
-const char *GetHeartRateRangeDescription(uint8_t range)\r
-{\r
-    return g_remindHeartRateRange[range];\r
-}\r
-\r
-uint16_t GetHeartRateRangeBounder(uint8_t index)\r
-{\r
-    return g_heartRateRangeBounder[index];\r
-}\r
-\r
-#if defined(_WIN32)\r
-void SportModel::SportAnimatorCallback::Callback(UIView *view)\r
-{\r
-    static uint64_t count = 0;\r
-    static bool increase = true;\r
-    if (count++ % COUNT_TIMES == 0) {\r
-        uint32_t randNum = rand();\r
-        uint32_t distance = randNum % DISTANCE_RANGE;\r
-        uint16_t calorie = randNum % CALORIE_RANGE;\r
-        uint16_t altitude = randNum % ALTITUDE_RANGE;\r
-        uint16_t ascent = randNum % ASCENT_RANGE;\r
-        uint16_t descent = randNum % DESCENT_RANGE;\r
-\r
-        sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-        sportInfo->data.distance += distance;\r
-        if (sportInfo->data.heartRate < HEARTRATE_MIN_VALUE) {\r
-            sportInfo->data.heartRate = HEARTRATE_MIN_VALUE;\r
-            increase = true;\r
-        }\r
-        if (sportInfo->data.heartRate > HEARTRATE_MAX_VALUE) {\r
-            sportInfo->data.heartRate = HEARTRATE_MAX_VALUE;\r
-            increase = false;\r
-        }\r
-        if (increase) {\r
-            sportInfo->data.heartRate++;\r
-        } else {\r
-            sportInfo->data.heartRate--;\r
-        }\r
-        sportInfo->data.calorie += calorie;\r
-        sportInfo->data.altitude += altitude;\r
-        sportInfo->data.ascent += ascent;\r
-        sportInfo->data.descent += descent;\r
-        sportInfo->data.lap++;\r
-    }\r
-}\r
-#else\r
-static void GenerateDataCallback(void *data)\r
-{\r
-    static bool increase = true;\r
-    uint32_t randNum = rand();\r
-    uint32_t distance = randNum % DISTANCE_RANGE;\r
-    uint16_t calorie = randNum % CALORIE_RANGE;\r
-    uint16_t altitude = randNum % ALTITUDE_RANGE;\r
-    uint16_t ascent = randNum % ASCENT_RANGE;\r
-    uint16_t descent = randNum % DESCENT_RANGE;\r
-\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    sportInfo->data.distance += distance;\r
-    if (sportInfo->data.heartRate < HEARTRATE_MIN_VALUE) {\r
-        sportInfo->data.heartRate = HEARTRATE_MIN_VALUE;\r
-        increase = true;\r
-    }\r
-    if (sportInfo->data.heartRate > HEARTRATE_MAX_VALUE) {\r
-        sportInfo->data.heartRate = HEARTRATE_MAX_VALUE;\r
-        increase = false;\r
-    }\r
-    if (increase) {\r
-        sportInfo->data.heartRate++;\r
-    } else {\r
-        sportInfo->data.heartRate--;\r
-    }\r
-    sportInfo->data.calorie += calorie;\r
-    sportInfo->data.altitude += altitude;\r
-    sportInfo->data.ascent += ascent;\r
-    sportInfo->data.descent += descent;\r
-    sportInfo->data.lap++;\r
-\r
-    if (!SportModel::GetInstance().IsStartByWatch()) {\r
-        msg_center_send_data(MSGCENTER_CMD_DEVICE, MSGCENTER_TYPE_ID_SPORT_REPORT_DATA, &sportInfo->data,\r
-                             sizeof(sport_data_t));\r
-    }\r
-}\r
-\r
-void SportModel::InitGenerateSportData()\r
-{\r
-    uint32_t tick = GetOSTick(2000);\r
-    generateDataHandle_ = new GraphicTimer(tick, GenerateDataCallback, nullptr, true);\r
-    if (generateDataHandle_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportModel::InitGenerateSportData new GraphicTimer failed!!");\r
-        return;\r
-    }\r
-}\r
-\r
-void SportModel::StartGenerateSportData()\r
-{\r
-    if (generateDataHandle_ != nullptr) {\r
-        bool retTimer = generateDataHandle_->Start();\r
-        if (!retTimer) {\r
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StartGenerateSportData failed!!");\r
-            if (generateDataHandle_ != nullptr) {\r
-                delete generateDataHandle_;\r
-                generateDataHandle_ = nullptr;\r
-            }\r
-            return;\r
-        }\r
-    }\r
-}\r
-\r
-void SportModel::StopGenerateSportData()\r
-{\r
-    if (generateDataHandle_ != nullptr) {\r
-        generateDataHandle_->Stop();\r
-    }\r
-}\r
-#endif\r
-\r
-SportModel::SportModel()\r
-{\r
-    LoadConfig();\r
-#if defined(_WIN32)\r
-    callback_ = new SportAnimatorCallback();\r
-    if (callback_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportModel::SportModel callback_ new fail");\r
-        return;\r
-    }\r
-\r
-    animator_ = new Animator(callback_, nullptr, 0, true);\r
-    if (animator_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportModel::SportModel new Animator animator_ fail");\r
-        return;\r
-    }\r
-#else\r
-    InitGenerateSportData();\r
-#endif\r
-}\r
-\r
-SportModel::~SportModel() {}\r
-\r
-SportModel &SportModel::GetInstance()\r
-{\r
-    static SportModel instance;\r
-    return instance;\r
-}\r
-\r
-void SportModel::SetSportType(SportType sportType)\r
-{\r
-    curSport_ = sportType;\r
-}\r
-\r
-SportType SportModel::GetSportType(void)\r
-{\r
-    return curSport_;\r
-}\r
-\r
-void SportModel::SetTargetValue(uint16_t index)\r
-{\r
-    SportTarget target = info_[curSport_].targetType;\r
-    if (target == SPORT_TARGET_DISTANCE) {\r
-        if (curSport_ == SPORT_TYPE_INDOOR_SWIMMING) {\r
-            info_[curSport_].targetValue = g_targetLapValues[index];\r
-        } else {\r
-            info_[curSport_].targetValue = g_targetDistanceValues[index];\r
-        }\r
-    } else if (target == SPORT_TARGET_TIME) {\r
-        info_[curSport_].targetValue = g_targetTimeValues[index];\r
-    } else if (target == SPORT_TARGET_CALORIE) {\r
-        info_[curSport_].targetValue = g_targetCalorieValues[index];\r
-    }\r
-}\r
-\r
-void SportModel::SetRemindValue(uint16_t index)\r
-{\r
-    SportRemindInterval remind = info_[curSport_].remindType;\r
-    if (remind == SPORT_REMIND_INTERVAL_DISTANCE) {\r
-        if (curSport_ == SPORT_TYPE_INDOOR_SWIMMING) {\r
-            info_[curSport_].remindValue = g_targetLapValues[index];\r
-        } else {\r
-            info_[curSport_].remindValue = g_targetDistanceValues[index];\r
-        }\r
-    } else if (remind == SPORT_REMIND_INTERVAL_TIME) {\r
-        info_[curSport_].remindValue = g_targetTimeValues[index];\r
-    }\r
-    info_[curSport_].remindIndex = index;\r
-}\r
-\r
-uint32_t SportModel::GetElapsedTime()\r
-{\r
-    if (state_ == SportState::RUNNING) {\r
-        uint32_t now = time(nullptr);\r
-        return info_[curSport_].data.elapsedTime + (now - info_[curSport_].startTimeTemp);\r
-    }\r
-    return info_[curSport_].data.elapsedTime;\r
-}\r
-\r
-void SportModel::SetGpsSignal(GpsSignal gpsSignal)\r
-{\r
-    gpsSignal_ = gpsSignal;\r
-}\r
-\r
-GpsSignal SportModel::GetGpsSignal(void)\r
-{\r
-    return gpsSignal_;\r
-}\r
-\r
-uint16_t SportModel::GetHeartRate(void)\r
-{\r
-    return info_[curSport_].data.heartRate;\r
-}\r
-\r
-sport_info_t *SportModel::GetSportInfo(SportType type)\r
-{\r
-    return &info_[type];\r
-}\r
-\r
-sport_info_t *SportModel::GetCurrSportInfo()\r
-{\r
-    return GetSportInfo(curSport_);\r
-}\r
-\r
-void SportModel::StartSport(bool startedByWatch)\r
-{\r
-    if (state_ == SportState::STOPPED) {\r
-        state_ = SportState::RUNNING;\r
-        isStartByWatch_ = startedByWatch;\r
-        info_[curSport_].targetHalf = false;\r
-        info_[curSport_].targetComplete = false;\r
-        info_[curSport_].isHeartReminded = false;\r
-        info_[curSport_].remindTimes = 0;\r
-        (void)memset_s(&(info_[curSport_].data), sizeof(info_[curSport_].data), 0, sizeof(sport_data_t));\r
-        info_[curSport_].data.startTime = time(nullptr);\r
-        info_[curSport_].startTimeTemp = info_[curSport_].data.startTime;\r
-#if defined(_WIN32)\r
-        animator_->Start();\r
-#else\r
-        StartGenerateSportData();\r
-#endif\r
-    }\r
-}\r
-\r
-void SportModel::PauseAndReport(bool isReport)\r
-{\r
-    if (state_ == SportState::RUNNING) {\r
-        state_ = SportState::PAUSED;\r
-        info_[curSport_].data.elapsedTime += time(nullptr) - info_[curSport_].startTimeTemp;\r
-#if defined(_WIN32)\r
-        animator_->Stop();\r
-#else\r
-        StopGenerateSportData();\r
-        if (isReport) {\r
-            sport_control_t control = {0};\r
-            control.action = static_cast<uint8_t>(SPORT_ACTION_PAUSE);\r
-            control.type = static_cast<uint8_t>(curSport_);\r
-            msg_center_send_data(MSGCENTER_CMD_DEVICE, MSGCENTER_TYPE_ID_SPORT_REPORT_ACTION, &control,\r
-                                 sizeof(sport_control_t));\r
-        }\r
-#endif\r
-    }\r
-}\r
-\r
-void SportModel::ResumeAndReport(bool isReport)\r
-{\r
-    if (state_ == SportState::PAUSED) {\r
-        state_ = SportState::RUNNING;\r
-        info_[curSport_].startTimeTemp = time(nullptr);\r
-#if defined(_WIN32)\r
-        animator_->Start();\r
-#else\r
-        StartGenerateSportData();\r
-        if (isReport) {\r
-            sport_control_t control = {0};\r
-            control.action = static_cast<uint8_t>(SPORT_ACTION_RESUME);\r
-            control.type = static_cast<uint8_t>(curSport_);\r
-            msg_center_send_data(MSGCENTER_CMD_DEVICE, MSGCENTER_TYPE_ID_SPORT_REPORT_ACTION, &control,\r
-                                 sizeof(sport_control_t));\r
-        }\r
-#endif\r
-    }\r
-}\r
-\r
-void SportModel::StopAndReport(bool isReport)\r
-{\r
-    if (state_ != SportState::STOPPED) {\r
-        state_ = SportState::STOPPED;\r
-        info_[curSport_].data.type = static_cast<uint8_t>(curSport_);\r
-        info_[curSport_].data.endTime = time(nullptr);\r
-#if defined(_WIN32)\r
-        animator_->Stop();\r
-#else\r
-        StopGenerateSportData();\r
-        if (isReport) {\r
-            sport_control_t control = {0};\r
-            control.action = static_cast<uint8_t>(SPORT_ACTION_STOP);\r
-            control.type = static_cast<uint8_t>(curSport_);\r
-            msg_center_send_data(MSGCENTER_CMD_DEVICE, MSGCENTER_TYPE_ID_SPORT_REPORT_ACTION, &control,\r
-                                 sizeof(sport_control_t));\r
-        }\r
-#endif\r
-    }\r
-}\r
-\r
-bool SportModel::IsStartByWatch()\r
-{\r
-    return isStartByWatch_;\r
-}\r
-\r
-void SportModel::AddRecord()\r
-{\r
-    if (isStartByWatch_) {\r
-        records_.push_back(info_[curSport_].data);\r
-    }\r
-    SaveConfig(SPORT_CONFIG_RECORD);\r
-}\r
-\r
-std::vector<sport_data_t> &SportModel::GetRecord()\r
-{\r
-    return records_;\r
-}\r
-\r
-void SportModel::ClearRecord()\r
-{\r
-    records_.clear();\r
-    std::remove(SPORT_RECORD_FILE);\r
-}\r
-\r
-void SportModel::LoadConfig()\r
-{\r
-    std::ifstream infoFile(SPORT_INFO_FILE, std::ios::binary);\r
-    if (infoFile) {\r
-        for (uint8_t i = 0; i < SPORT_TYPE_MAX; i++) {\r
-            infoFile.read(reinterpret_cast<char *>(&info_[i]), sizeof(sport_info_t));\r
-        }\r
-        infoFile.close();\r
-    }\r
-    std::ifstream recordFile(SPORT_RECORD_FILE, std::ios::binary);\r
-    if (recordFile) {\r
-        uint16_t num = 0;\r
-        recordFile.read(reinterpret_cast<char *>(&num), sizeof(uint16_t));\r
-        for (uint8_t i = 0; i < num; i++) {\r
-            sport_data_t data;\r
-            recordFile.read(reinterpret_cast<char *>(&data), sizeof(sport_data_t));\r
-            records_.push_back(data);\r
-        }\r
-        recordFile.close();\r
-    }\r
-}\r
-\r
-void SportModel::SaveConfig(uint8_t config)\r
-{\r
-    if (config == SPORT_CONFIG_INFO) {\r
-        std::ofstream infoFile(SPORT_INFO_FILE, std::ios::binary);\r
-        if (infoFile) {\r
-            infoFile.write(reinterpret_cast<char *>(&info_), SPORT_TYPE_MAX * sizeof(sport_info_t));\r
-            infoFile.close();\r
-        }\r
-    } else if (config == SPORT_CONFIG_RECORD) {\r
-        std::ofstream recordFile(SPORT_RECORD_FILE, std::ios::binary);\r
-        if (recordFile) {\r
-            uint16_t num = records_.size();\r
-            recordFile.write(reinterpret_cast<char *>(&num), sizeof(uint16_t));\r
-            for (uint8_t i = 0; i < num; i++) {\r
-                recordFile.write(reinterpret_cast<char *>(&records_[i]), sizeof(sport_data_t));\r
-            }\r
-            recordFile.close();\r
-        }\r
-    }\r
-}\r
-\r
-void SportModel::ClearData()\r
-{\r
-    std::remove(SPORT_INFO_FILE);\r
-    std::remove(SPORT_RECORD_FILE);\r
-}\r
-}\r
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPausePage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPausePage.cpp
deleted file mode 100644 (file)
index 8a490f7..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportPausePage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportPausePage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t NUM_THOUSAND = 1000;\r
-static constexpr uint16_t TIME_LABEL_FONT = 48;\r
-static constexpr uint16_t TIME_LABEL_X = 166;\r
-static constexpr uint16_t TIME_LABEL_Y = 35;\r
-static constexpr uint16_t TIME_LABEL_W = 122;\r
-static constexpr uint16_t TIME_LABEL_H = 48;\r
-static constexpr uint16_t TEXT_LABEL_FONT = 64;\r
-static constexpr uint16_t TEXT_LABEL_X = 130;\r
-static constexpr uint16_t TEXT_LABEL_Y = 151;\r
-static constexpr uint16_t TEXT_LABEL_W = 194;\r
-static constexpr uint16_t TEXT_LABEL_H = 80;\r
-static constexpr uint16_t BUTTON_X1 = 54;\r
-static constexpr uint16_t BUTTON_X2 = 217;\r
-static constexpr uint16_t BUTTON_Y = 250;\r
-static constexpr uint16_t BUTTON_W = 184;\r
-static constexpr uint16_t BUTTON_H = 184;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_PAUSE, SportPausePage, false);\r
-\r
-void SportPausePage::SportPauseAnimatorCallback::Callback(UIView *view)\r
-{\r
-    UILabel *timeLabel = dynamic_cast<UILabel *>(view);\r
-    if (timeLabel == nullptr) {\r
-        return;\r
-    }\r
-    std::string currTime = GetCurrentTimeStr();\r
-    timeLabel->SetText(currTime.c_str());\r
-    timeLabel->Invalidate();\r
-}\r
-\r
-SportPausePage::~SportPausePage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (timeLabel_ != nullptr) {\r
-        delete timeLabel_;\r
-        timeLabel_ = nullptr;\r
-    }\r
-    if (textLabel_ != nullptr) {\r
-        delete textLabel_;\r
-        textLabel_ = nullptr;\r
-    }\r
-    if (continueButton_ != nullptr) {\r
-        delete continueButton_;\r
-        continueButton_ = nullptr;\r
-    }\r
-    if (finishButton_ != nullptr) {\r
-        delete finishButton_;\r
-        finishButton_ = nullptr;\r
-    }\r
-    if (animator_ != nullptr) {\r
-        delete animator_;\r
-        animator_ = nullptr;\r
-    }\r
-    if (callback_ != nullptr) {\r
-        delete callback_;\r
-        callback_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportPausePage::~SportPausePage");\r
-}\r
-\r
-void SportPausePage::CreateUILabel()\r
-{\r
-    timeLabel_ = new UILabel();\r
-    if (timeLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPausePage timeLabel_ new fail");\r
-        return;\r
-    }\r
-    timeLabel_->SetPosition(TIME_LABEL_X, TIME_LABEL_Y, TIME_LABEL_W, TIME_LABEL_H);\r
-    timeLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    timeLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, TIME_LABEL_FONT);\r
-    group_->Add(timeLabel_);\r
-\r
-    textLabel_ = new UILabel();\r
-    if (textLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPausePage textLabel_ new fail");\r
-        return;\r
-    }\r
-    textLabel_->SetPosition(TEXT_LABEL_X, TEXT_LABEL_Y, TEXT_LABEL_W, TEXT_LABEL_H);\r
-    textLabel_->SetText("已暂停");\r
-    textLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    textLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, TEXT_LABEL_FONT);\r
-    group_->Add(textLabel_);\r
-\r
-    callback_ = new SportPauseAnimatorCallback();\r
-    if (callback_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPausePage::OnStart callback_ new fail");\r
-        return;\r
-    }\r
-\r
-    animator_ = new Animator(callback_, timeLabel_, 0, true);\r
-    if (animator_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPausePage::OnStart new Animator animator_ fail");\r
-        return;\r
-    }\r
-}\r
-\r
-void SportPausePage::OnPause()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() != Animator::STOP) {\r
-            animator_->Stop();\r
-        }\r
-    }\r
-}\r
-\r
-void SportPausePage::OnResume()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() == Animator::STOP) {\r
-            animator_->Start();\r
-        }\r
-    }\r
-}\r
-\r
-void SportPausePage::CreateUIButton()\r
-{\r
-    finishButton_ = new UILabelButton();\r
-    if (finishButton_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPausePage finishButton_ new fail");\r
-        return;\r
-    }\r
-    finishButton_->SetPosition(BUTTON_X1, BUTTON_Y, BUTTON_W, BUTTON_H);\r
-    finishButton_->SetViewId(SPORT_PAUSE_FINISH_BUTTON);\r
-    finishButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::RELEASED);\r
-    finishButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::PRESSED);\r
-    finishButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::INACTIVE);\r
-    LOADIMG::LoadBtnImage(finishButton_, SPORT_IMAGE, IMAGE_SPORT_STOP, IMAGE_SPORT_STOP);\r
-    finishButton_->SetOnClickListener(this);\r
-    group_->Add(finishButton_);\r
-\r
-    continueButton_ = new UILabelButton();\r
-    if (continueButton_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPausePage continueButton_ new fail");\r
-        return;\r
-    }\r
-    continueButton_->SetPosition(BUTTON_X2, BUTTON_Y, BUTTON_W, BUTTON_H);\r
-    continueButton_->SetViewId(SPORT_PAUSE_CONTINUE_BUTTON);\r
-    continueButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::RELEASED);\r
-    continueButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::PRESSED);\r
-    continueButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::INACTIVE);\r
-    LOADIMG::LoadBtnImage(continueButton_, SPORT_IMAGE, IMAGE_SPORT_START, IMAGE_SPORT_START);\r
-    continueButton_->SetOnClickListener(this);\r
-    group_->Add(continueButton_);\r
-}\r
-\r
-void SportPausePage::OnStart(void *data)\r
-{\r
-    group_ = new UIViewGroup();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPausePage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-\r
-    CreateUILabel();\r
-    CreateUIButton();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportPausePage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        SportModel::GetInstance().ResumeAndReport(true);\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_DATA,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportPausePage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), SPORT_PAUSE_CONTINUE_BUTTON) == 0) {\r
-        SportModel::GetInstance().ResumeAndReport(true);\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_DATA,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    } else if (strcmp(view.GetViewId(), SPORT_PAUSE_FINISH_BUTTON) == 0) {\r
-        sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-        if (sportInfo->data.distance < NUM_THOUSAND) {\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_PROMPT,\r
-                TransitionType::TRANSITION_INVALID, false);\r
-        } else {\r
-            SportModel::GetInstance().StopAndReport(true);\r
-            SportModel::GetInstance().AddRecord();\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_MENU,\r
-                TransitionType::TRANSITION_INVALID, false);\r
-        }\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPreparePage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPreparePage.cpp
deleted file mode 100644 (file)
index 041bba0..0000000
+++ /dev/null
@@ -1,422 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportPreparePage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include <sys/time.h>\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "settings/model/SettingPowerModel.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportPreparePage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t LOCATING_OVERTIME_SECOND = 2;\r
-static constexpr uint16_t BATTERY_LEVEL1 = 10;\r
-static constexpr uint16_t BATTERY_LEVEL2 = 20;\r
-static constexpr uint16_t BATTERY_LEVEL3 = 40;\r
-static constexpr uint16_t BATTERY_LEVEL4 = 70;\r
-static constexpr uint16_t BATTERY_LEVEL5 = 100;\r
-static constexpr uint16_t HEARTBEAT_IMAGE_X = 351;\r
-static constexpr uint16_t HEARTBEAT_IMAGE_Y = 223;\r
-static constexpr uint16_t HEARTBEAT_LABEL_X = 329;\r
-static constexpr uint16_t HEARTBEAT_LABEL_Y = 182;\r
-static constexpr uint16_t HEARTBEAT_LABEL_W = 102;\r
-static constexpr uint16_t HEARTBEAT_LABEL_H = 48;\r
-static constexpr uint16_t HEARTBEAT_LABEL_FONT = 32;\r
-static constexpr uint16_t BATTERY_ICON_X = 159;\r
-static constexpr uint16_t BATTERY_ICON_Y = 31;\r
-static constexpr uint16_t BATTERY_LABEL_FONT = 20;\r
-static constexpr uint16_t BATTERY_LABEL_X = 163;\r
-static constexpr uint16_t BATTERY_LABEL_Y = 31;\r
-static constexpr uint16_t BATTERY_LABEL_W = 35;\r
-static constexpr uint16_t BATTERY_LABEL_H = 22;\r
-static constexpr uint16_t GPS_X = 48;\r
-static constexpr uint16_t GPS_Y = 225;\r
-static constexpr uint16_t SIGNAL_X = 44;\r
-static constexpr uint16_t SIGNAL_Y = 175;\r
-static constexpr uint16_t TIME_LABEL_FONT = 32;\r
-static constexpr uint16_t TIME_LABEL_X = 214;\r
-static constexpr uint16_t TIME_LABEL_Y = 23;\r
-static constexpr uint16_t TIME_LABEL_W = 82;\r
-static constexpr uint16_t TIME_LABEL_H = 47;\r
-static constexpr uint16_t LOCATING_LABEL_FONT = 32;\r
-static constexpr uint16_t LOCATING_LABEL_X = 165;\r
-static constexpr uint16_t LOCATING_LABEL_Y = 80;\r
-static constexpr uint16_t LOCATING_LABEL_W = 164;\r
-static constexpr uint16_t LOCATING_LABEL_H = 34;\r
-static constexpr uint16_t CENTER_IMAGE_X = 132;\r
-static constexpr uint16_t CENTER_IMAGE_Y = 132;\r
-static constexpr uint16_t GO_BUTTON_X = 63;\r
-static constexpr uint16_t GO_BUTTON_Y = 361;\r
-static constexpr uint16_t GO_BUTTON_W = 328;\r
-static constexpr uint16_t GO_BUTTON_H = 93;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_PREPARE, SportPreparePage, false);\r
-\r
-void SportPreparePage::SportPrepareAnimatorCallback::Callback(UIView *view)\r
-{\r
-    UNUSED(view);\r
-\r
-    std::string currTime = GetCurrentTimeStr();\r
-    page_->timeLabel_->SetText(currTime.c_str());\r
-    page_->timeLabel_->Invalidate();\r
-\r
-    uint8_t battery = SettingPowerModel::GetInstance().GetBatteryPowerLevel();\r
-    page_->batteryLabel_->SetText(std::to_string(battery).c_str());\r
-    page_->batteryLabel_->Invalidate();\r
-\r
-    if (battery < BATTERY_LEVEL1) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY1);\r
-    } else if (battery < BATTERY_LEVEL2) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY2);\r
-    } else if (battery < BATTERY_LEVEL3) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY3);\r
-    } else if (battery < BATTERY_LEVEL4) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY4);\r
-    } else if (battery <= BATTERY_LEVEL5) {\r
-        LOADIMG::LoadImageViewImg(page_->batteryIcon_, SPORT_IMAGE, IMAGE_SPORT_BATTERY5);\r
-    }\r
-\r
-    time_t now = time(nullptr);\r
-    if (!page_->isOverTime_ && (now - page_->startTime_ > LOCATING_OVERTIME_SECOND)) {\r
-        page_->isOverTime_ = true;\r
-        page_->InitGpsSignalImage();\r
-    }\r
-}\r
-\r
-SportPreparePage::~SportPreparePage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (background_ != nullptr) {\r
-        delete background_;\r
-        background_ = nullptr;\r
-    }\r
-    if (timeLabel_ != nullptr) {\r
-        delete timeLabel_;\r
-        timeLabel_ = nullptr;\r
-    }\r
-    if (batteryIcon_ != nullptr) {\r
-        delete batteryIcon_;\r
-        batteryIcon_ = nullptr;\r
-    }\r
-    if (batteryLabel_ != nullptr) {\r
-        delete batteryLabel_;\r
-        batteryLabel_ = nullptr;\r
-    }\r
-    if (gpsImageView_ != nullptr) {\r
-        delete gpsImageView_;\r
-        gpsImageView_ = nullptr;\r
-    }\r
-    if (gpsSignalView_ != nullptr) {\r
-        delete gpsSignalView_;\r
-        gpsSignalView_ = nullptr;\r
-    }\r
-    if (heartRateImageView_ != nullptr) {\r
-        delete heartRateImageView_;\r
-        heartRateImageView_ = nullptr;\r
-    }\r
-    if (heartRateLabel_ != nullptr) {\r
-        delete heartRateLabel_;\r
-        heartRateLabel_ = nullptr;\r
-    }\r
-    if (locatingLabel_ != nullptr) {\r
-        delete locatingLabel_;\r
-        locatingLabel_ = nullptr;\r
-    }\r
-    if (goButton_ != nullptr) {\r
-        delete goButton_;\r
-        goButton_ = nullptr;\r
-    }\r
-    if (iconImageView_ != nullptr) {\r
-        delete iconImageView_;\r
-        iconImageView_ = nullptr;\r
-    }\r
-    if (animator_ != nullptr) {\r
-        delete animator_;\r
-        animator_ = nullptr;\r
-    }\r
-    if (callback_ != nullptr) {\r
-        delete callback_;\r
-        callback_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportPreparePage::~SportPreparePage");\r
-}\r
-\r
-void SportPreparePage::InitGpsSignalImage()\r
-{\r
-    locatingLabel_->SetVisible(false);\r
-    LOADIMG::LoadImageViewImg(gpsSignalView_, SPORT_IMAGE, IMAGE_SPORT_SIGNAL2);\r
-}\r
-\r
-void SportPreparePage::InitTimeLableVIew()\r
-{\r
-    timeLabel_ = new UILabel();\r
-    if (timeLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage timeLabel_ new fail");\r
-        return;\r
-    }\r
-    timeLabel_->SetPosition(TIME_LABEL_X, TIME_LABEL_Y, TIME_LABEL_W, TIME_LABEL_H);\r
-    timeLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, TIME_LABEL_FONT);\r
-    group_->Add(timeLabel_);\r
-}\r
-\r
-void SportPreparePage::InitBatteryView()\r
-{\r
-    batteryIcon_ = new UIImageView();\r
-    if (batteryIcon_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage batteryIcon_ new fail");\r
-        return;\r
-    }\r
-    batteryIcon_->SetPosition(BATTERY_ICON_X, BATTERY_ICON_Y);\r
-    batteryIcon_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    group_->Add(batteryIcon_);\r
-\r
-    batteryLabel_ = new UILabel();\r
-    if (batteryLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage batteryLabel_ new fail");\r
-        return;\r
-    }\r
-    batteryLabel_->SetPosition(BATTERY_LABEL_X, BATTERY_LABEL_Y, BATTERY_LABEL_W, BATTERY_LABEL_H);\r
-    batteryLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, BATTERY_LABEL_FONT);\r
-    batteryLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    group_->Add(batteryLabel_);\r
-}\r
-\r
-void SportPreparePage::InitCenterView()\r
-{\r
-    iconImageView_ = new UIImageView();\r
-    if (iconImageView_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage iconImageView_ new fail");\r
-        return;\r
-    }\r
-    iconImageView_->SetPosition(CENTER_IMAGE_X, CENTER_IMAGE_Y);\r
-    SportType sportType = SportModel::GetInstance().GetSportType();\r
-    if (sportType == SPORT_TYPE_OUTDOOR_RUNNING) {\r
-        LOADIMG::LoadImageViewImg(iconImageView_, SPORT_IMAGE, IMAGE_SPORT_OUTDOOR_RUNNING2);\r
-    } else if (sportType == SPORT_TYPE_INDOOR_RUNNING) {\r
-        LOADIMG::LoadImageViewImg(iconImageView_, SPORT_IMAGE, IMAGE_SPORT_INDOOR_RUNNING2);\r
-    } else if (sportType == SPORT_TYPE_CYCLING) {\r
-        LOADIMG::LoadImageViewImg(iconImageView_, SPORT_IMAGE, IMAGE_SPORT_CYCLING2);\r
-    } else if (sportType == SPORT_TYPE_CLIMBING) {\r
-        LOADIMG::LoadImageViewImg(iconImageView_, SPORT_IMAGE, IMAGE_SPORT_CLIMBING2);\r
-    } else if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-        LOADIMG::LoadImageViewImg(iconImageView_, SPORT_IMAGE, IMAGE_SPORT_INDOOR_SWIMMING2);\r
-    } else if (sportType == SPORT_TYPE_OUTDOOR_SWIMMING) {\r
-        LOADIMG::LoadImageViewImg(iconImageView_, SPORT_IMAGE, IMAGE_SPORT_OUTDOOR_SWIMMING2);\r
-    }\r
-    group_->Add(iconImageView_);\r
-}\r
-\r
-void SportPreparePage::InitGPSView()\r
-{\r
-    locatingLabel_ = new UILabel();\r
-    if (locatingLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage locatingLabel_ new fail");\r
-        return;\r
-    }\r
-    locatingLabel_->SetPosition(LOCATING_LABEL_X, LOCATING_LABEL_Y, LOCATING_LABEL_W, LOCATING_LABEL_H);\r
-    locatingLabel_->SetText("定位中...");\r
-    locatingLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LOCATING_LABEL_FONT);\r
-    locatingLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    group_->Add(locatingLabel_);\r
-\r
-    gpsSignalView_ = new UIImageView();\r
-    if (gpsSignalView_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage gpsSignalView_ new fail");\r
-        return;\r
-    }\r
-    gpsSignalView_->SetPosition(SIGNAL_X, SIGNAL_Y);\r
-    GpsSignal signal = SportModel::GetInstance().GetGpsSignal();\r
-    if (signal == SPORT_GPS_SIGNAL0) {\r
-        LOADIMG::LoadImageViewImg(gpsSignalView_, SPORT_IMAGE, IMAGE_SPORT_SIGNAL0);\r
-    } else if (signal == SPORT_GPS_SIGNAL1) {\r
-        LOADIMG::LoadImageViewImg(gpsSignalView_, SPORT_IMAGE, IMAGE_SPORT_SIGNAL1);\r
-    } else if (signal == SPORT_GPS_SIGNAL2) {\r
-        LOADIMG::LoadImageViewImg(gpsSignalView_, SPORT_IMAGE, IMAGE_SPORT_SIGNAL2);\r
-    } else if (signal == SPORT_GPS_SIGNAL3) {\r
-        LOADIMG::LoadImageViewImg(gpsSignalView_, SPORT_IMAGE, IMAGE_SPORT_SIGNAL3);\r
-    }\r
-    group_->Add(gpsSignalView_);\r
-\r
-    gpsImageView_ = new UIImageView();\r
-    if (gpsImageView_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage gpsImageView_ new fail");\r
-        return;\r
-    }\r
-    gpsImageView_->SetPosition(GPS_X, GPS_Y);\r
-    LOADIMG::LoadImageViewImg(gpsImageView_, SPORT_IMAGE, IMAGE_SPORT_GPS);\r
-    group_->Add(gpsImageView_);\r
-\r
-    SportType sportType = SportModel::GetInstance().GetSportType();\r
-    if (sportType == SPORT_TYPE_INDOOR_RUNNING || sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-        locatingLabel_->SetVisible(false);\r
-        gpsSignalView_->SetVisible(false);\r
-        gpsImageView_->SetVisible(false);\r
-    } else {\r
-        locatingLabel_->SetVisible(true);\r
-        gpsSignalView_->SetVisible(true);\r
-        gpsImageView_->SetVisible(true);\r
-    }\r
-}\r
-\r
-void SportPreparePage::InitHeartRateView()\r
-{\r
-    heartRateLabel_ = new UILabel();\r
-    if (heartRateLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage heartRateLabel_ new fail");\r
-        return;\r
-    }\r
-    heartRateLabel_->SetPosition(HEARTBEAT_LABEL_X, HEARTBEAT_LABEL_Y, HEARTBEAT_LABEL_W, HEARTBEAT_LABEL_H);\r
-    heartRateLabel_->SetText("95");  // 桩数据\r
-    heartRateLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, HEARTBEAT_LABEL_FONT);\r
-    heartRateLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    group_->Add(heartRateLabel_);\r
-\r
-    heartRateImageView_ = new UIImageView();\r
-    if (heartRateImageView_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage heartRateImageView_ new fail");\r
-        return;\r
-    }\r
-    heartRateImageView_->SetPosition(HEARTBEAT_IMAGE_X, HEARTBEAT_IMAGE_Y);\r
-    LOADIMG::LoadImageViewImg(heartRateImageView_, SPORT_IMAGE, IMAGE_SPORT_HEART1);\r
-    group_->Add(heartRateImageView_);\r
-}\r
-\r
-void SportPreparePage::InitGoButtonView()\r
-{\r
-    goButton_ = new UILabelButton();\r
-    if (goButton_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage goButton_ new fail");\r
-        return;\r
-    }\r
-    goButton_->SetPosition(GO_BUTTON_X, GO_BUTTON_Y, GO_BUTTON_W, GO_BUTTON_H);\r
-    goButton_->SetViewId(SPORT_PREPARE_GO_BUTTON);\r
-    goButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::RELEASED);\r
-    goButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::PRESSED);\r
-    goButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::INACTIVE);\r
-    SportType sportType = SportModel::GetInstance().GetSportType();\r
-    if (sportType == SPORT_TYPE_OUTDOOR_RUNNING) {\r
-        LOADIMG::LoadBtnImage(goButton_, SPORT_IMAGE, IMAGE_SPORT_GO1, IMAGE_SPORT_GO1);\r
-    } else if (sportType == SPORT_TYPE_INDOOR_RUNNING) {\r
-        LOADIMG::LoadBtnImage(goButton_, SPORT_IMAGE, IMAGE_SPORT_GO2, IMAGE_SPORT_GO2);\r
-    } else if (sportType == SPORT_TYPE_CYCLING) {\r
-        LOADIMG::LoadBtnImage(goButton_, SPORT_IMAGE, IMAGE_SPORT_GO3, IMAGE_SPORT_GO3);\r
-    } else if (sportType == SPORT_TYPE_CLIMBING) {\r
-        LOADIMG::LoadBtnImage(goButton_, SPORT_IMAGE, IMAGE_SPORT_GO4, IMAGE_SPORT_GO4);\r
-    } else if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-        LOADIMG::LoadBtnImage(goButton_, SPORT_IMAGE, IMAGE_SPORT_GO6, IMAGE_SPORT_GO6);\r
-    } else if (sportType == SPORT_TYPE_OUTDOOR_SWIMMING) {\r
-        LOADIMG::LoadBtnImage(goButton_, SPORT_IMAGE, IMAGE_SPORT_GO5, IMAGE_SPORT_GO5);\r
-    }\r
-    goButton_->SetOnClickListener(this);\r
-    group_->Add(goButton_);\r
-}\r
-\r
-void SportPreparePage::InitBackgroundView()\r
-{\r
-    background_ = new UIImageView();\r
-    if (background_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage background_ new fail");\r
-        return;\r
-    }\r
-    background_->SetPosition(0, 0);\r
-    SportType sportType = SportModel::GetInstance().GetSportType();\r
-    if (sportType == SPORT_TYPE_OUTDOOR_RUNNING) {\r
-        LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG6);\r
-    } else if (sportType == SPORT_TYPE_INDOOR_RUNNING) {\r
-        LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG1);\r
-    } else if (sportType == SPORT_TYPE_CYCLING) {\r
-        LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG4);\r
-    } else if (sportType == SPORT_TYPE_CLIMBING) {\r
-        LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG3);\r
-    } else if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-        LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG2);\r
-    } else if (sportType == SPORT_TYPE_OUTDOOR_SWIMMING) {\r
-        LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG5);\r
-    }\r
-    group_->Add(background_);\r
-}\r
-\r
-void SportPreparePage::OnStart(void *data)\r
-{\r
-    startTime_ = time(nullptr);  // 用于在 animator 回调中, 模拟显示 '定位中'\r
-    group_ = new UIViewGroup();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-\r
-    InitBackgroundView();\r
-    InitTimeLableVIew();\r
-    InitBatteryView();\r
-    InitCenterView();\r
-    InitGPSView();\r
-    InitHeartRateView();\r
-    InitGoButtonView();\r
-    AddViewToPageContainer(group_);\r
-\r
-    callback_ = new SportPrepareAnimatorCallback(this);\r
-    if (callback_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage::OnStart callback_ new fail");\r
-        return;\r
-    }\r
-\r
-    animator_ = new Animator(callback_, nullptr, 0, true);\r
-    if (animator_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPreparePage::OnStart new Animator animator_ fail");\r
-        return;\r
-    }\r
-}\r
-\r
-void SportPreparePage::OnPause()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() != Animator::STOP) {\r
-            animator_->Stop();\r
-        }\r
-    }\r
-}\r
-\r
-void SportPreparePage::OnResume()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() == Animator::STOP) {\r
-            animator_->Start();\r
-        }\r
-    }\r
-}\r
-\r
-bool SportPreparePage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_MENU,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportPreparePage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), SPORT_PREPARE_GO_BUTTON) == 0) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_COUNTDOWN,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPresenter.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPresenter.cpp
deleted file mode 100644 (file)
index b510e85..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportPresenter\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "NativeRegisterManager.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportPresenter.h"\r
-\r
-namespace OHOS {\r
-REGIST_MENU(VIEW_SPORT, SportView, SportPresenter, SPORT_ICON, SPORT_ICON, "运动");\r
-}\r
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPromptPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportPromptPage.cpp
deleted file mode 100644 (file)
index f5d7132..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportPromptPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportModel.h"\r
-#include "sport/SportPromptPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t ICON_X = 173;\r
-static constexpr uint16_t ICON_Y = 48;\r
-static constexpr uint16_t LABEL_X = 24;\r
-static constexpr uint16_t LABEL_Y = 177;\r
-static constexpr uint16_t LABEL_W = 405;\r
-static constexpr uint16_t LABEL_H = 100;\r
-static constexpr uint16_t LABEL_FONT = 36;\r
-static constexpr uint16_t BUTTON_X1 = 104;\r
-static constexpr uint16_t BUTTON_X2 = 240;\r
-static constexpr uint16_t BUTTON_Y = 296;\r
-static constexpr uint16_t BUTTON_W = 109;\r
-static constexpr uint16_t BUTTON_H = 109;\r
-static const char *PROMPT_CONTENT = "本次运动距离过短,不会记录数据。是否结束?";\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_PROMPT, SportPromptPage, false);\r
-\r
-SportPromptPage::~SportPromptPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (promptLabel_ != nullptr) {\r
-        delete promptLabel_;\r
-        promptLabel_ = nullptr;\r
-    }\r
-    if (promptIcon_ != nullptr) {\r
-        delete promptIcon_;\r
-        promptIcon_ = nullptr;\r
-    }\r
-    if (cancelButton_ != nullptr) {\r
-        delete cancelButton_;\r
-        cancelButton_ = nullptr;\r
-    }\r
-    if (confirmButton_ != nullptr) {\r
-        delete confirmButton_;\r
-        confirmButton_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportPromptPage::~SportPromptPage");\r
-}\r
-\r
-void SportPromptPage::CreateUILabel()\r
-{\r
-    promptIcon_ = new UIImageView();\r
-    if (promptIcon_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPromptPage promptIcon_ new fail");\r
-        return;\r
-    }\r
-    promptIcon_->SetPosition(ICON_X, ICON_Y);\r
-    LOADIMG::LoadImageViewImg(promptIcon_, SPORT_IMAGE, IMAGE_SPORT_FACE);\r
-    group_->Add(promptIcon_);\r
-\r
-    promptLabel_ = new UILabel();\r
-    if (promptLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPromptPage promptLabel_ new fail");\r
-        return;\r
-    }\r
-    promptLabel_->SetPosition(LABEL_X, LABEL_Y, LABEL_W, LABEL_H);\r
-    promptLabel_->SetText(PROMPT_CONTENT);\r
-    promptLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-    promptLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    group_->Add(promptLabel_);\r
-}\r
-\r
-void SportPromptPage::CreateUIButton()\r
-{\r
-    cancelButton_ = new UIButton();\r
-    if (cancelButton_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPromptPage cancelButton_ new fail");\r
-        return;\r
-    }\r
-    cancelButton_->SetPosition(BUTTON_X1, BUTTON_Y, BUTTON_W, BUTTON_H);\r
-    cancelButton_->SetViewId(SPORT_PROMPT_CANCEL_BUTTON);\r
-    cancelButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::RELEASED);\r
-    cancelButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::PRESSED);\r
-    cancelButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::INACTIVE);\r
-    LOADIMG::LoadBtnImage(cancelButton_, SPORT_IMAGE, IMAGE_SPORT_CANCEL, IMAGE_SPORT_CANCEL);\r
-    cancelButton_->SetOnClickListener(this);\r
-    group_->Add(cancelButton_);\r
-\r
-    confirmButton_ = new UIButton();\r
-    if (confirmButton_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPromptPage confirmButton_ new fail");\r
-        return;\r
-    }\r
-    confirmButton_->SetPosition(BUTTON_X2, BUTTON_Y, BUTTON_W, BUTTON_H);\r
-    confirmButton_->SetViewId(SPORT_PROMPT_CONFIRM_BUTTON);\r
-    confirmButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::RELEASED);\r
-    confirmButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::PRESSED);\r
-    confirmButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::INACTIVE);\r
-    LOADIMG::LoadBtnImage(confirmButton_, SPORT_IMAGE, IMAGE_SPORT_CONFIRM, IMAGE_SPORT_CONFIRM);\r
-    confirmButton_->SetOnClickListener(this);\r
-    group_->Add(confirmButton_);\r
-}\r
-\r
-void SportPromptPage::OnStart(void *data)\r
-{\r
-    group_ = new UIViewGroup();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportPromptPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-\r
-    CreateUILabel();\r
-    CreateUIButton();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportPromptPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    return true;\r
-}\r
-\r
-bool SportPromptPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), SPORT_PROMPT_CANCEL_BUTTON) == 0) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_PAUSE,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    } else if (strcmp(view.GetViewId(), SPORT_PROMPT_CONFIRM_BUTTON) == 0) {\r
-        SportModel::GetInstance().StopAndReport(true);\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_MENU,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindHeartRateItemView.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindHeartRateItemView.cpp
deleted file mode 100644 (file)
index 071a4ed..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindHeartRateItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "sport/SportModel.h"\r
-#include "sport/SportRemindHeartRateItemView.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t BG_X = 0;\r
-static constexpr uint16_t BG_Y = 6;\r
-static constexpr uint16_t ICON_X = 8;\r
-static constexpr uint16_t ICON_Y = 13;\r
-static constexpr uint16_t LABEL_X = 100;\r
-static constexpr uint16_t LABEL_Y = 17;\r
-static constexpr uint16_t LABEL_W = 207;\r
-static constexpr uint16_t LABEL_H = 39;\r
-static constexpr uint16_t LABEL_FONT = 32;\r
-static constexpr uint16_t HITS_X = 100;\r
-static constexpr uint16_t HITS_Y = 60;\r
-static constexpr uint16_t HITS_W = 176;\r
-static constexpr uint16_t HITS_H = 29;\r
-static constexpr uint16_t HITS_FONT = 24;\r
-static constexpr uint16_t IMAGE_X = 370;\r
-static constexpr uint16_t IMAGE_Y = 38;\r
-static constexpr uint16_t BUTTON_X = 304;\r
-static constexpr uint16_t BUTTON_Y = 33;\r
-static constexpr uint16_t BUTTON_W = 81;\r
-static constexpr uint16_t BUTTON_H = 46;\r
-\r
-SportRemindHeartRateItemView::SportRemindHeartRateItemView()\r
-{\r
-    bgImage_.SetPosition(BG_X, BG_Y);\r
-    LOADIMG::LoadImageViewImg(&bgImage_, SPORT_IMAGE, IMAGE_SPORT_ITEMBG);\r
-\r
-    icon_.SetPosition(ICON_X, ICON_Y);\r
-\r
-    label_.SetPosition(LABEL_X, LABEL_Y, LABEL_W, LABEL_H);\r
-    label_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-    label_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    label_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    hits_.SetPosition(HITS_X, HITS_Y, HITS_W, HITS_H);\r
-    hits_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, HITS_FONT);\r
-    hits_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    hits_.SetStyle(STYLE_TEXT_COLOR, Color::Gray().full);\r
-    hits_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    nextImage_.SetPosition(IMAGE_X, IMAGE_Y);\r
-    LOADIMG::LoadImageViewImg(&nextImage_, SPORT_IMAGE, IMAGE_SPORT_NEXT);\r
-\r
-    button_.SetPosition(BUTTON_X, BUTTON_Y, BUTTON_W, BUTTON_H);\r
-    button_.SetImages(ImageCacheManager::GetInstance().LoadOneInMultiRes(IMAGE_SPORT_TOGGLE1, SPORT_IMAGE),\r
-                      ImageCacheManager::GetInstance().LoadOneInMultiRes(IMAGE_SPORT_TOGGLE0, SPORT_IMAGE));\r
-\r
-    Add(&bgImage_);\r
-    Add(&icon_);\r
-    Add(&label_);\r
-    Add(&hits_);\r
-    Add(&button_);\r
-    Add(&nextImage_);\r
-}\r
-\r
-SportRemindHeartRateItemView::~SportRemindHeartRateItemView()\r
-{\r
-    Remove(&bgImage_);\r
-    Remove(&icon_);\r
-    Remove(&label_);\r
-    Remove(&hits_);\r
-    Remove(&button_);\r
-    Remove(&nextImage_);\r
-}\r
-\r
-void SportRemindHeartRateItemView::SetItemInfo(const SportRemindHeartRateItem &itemInfo)\r
-{\r
-    LOADIMG::LoadImageViewImg(&icon_, SPORT_IMAGE, itemInfo.iconId);\r
-    label_.SetText(itemInfo.label);\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (itemInfo.itemId == SPORT_REMIND_HEARTRATE_ENABLE) {\r
-        button_.SetVisible(true);\r
-        button_.SetState(sportInfo->enableHeartRemind);\r
-        if (sportInfo->enableHeartRemind) {\r
-            hits_.SetText("开启");\r
-        } else {\r
-            hits_.SetText("关闭");\r
-        }\r
-        nextImage_.SetVisible(false);\r
-    } else if (itemInfo.itemId == SPORT_REMIND_HEARTRATE_RANGE) {\r
-        button_.SetVisible(false);\r
-        nextImage_.SetVisible(true);\r
-        hits_.SetText(GetHeartRateRangeDescription(sportInfo->heartRange));\r
-    }\r
-    SetViewId(itemInfo.viewId);\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindHeartRatePage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindHeartRatePage.cpp
deleted file mode 100644 (file)
index f8d7813..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindHeartRatePage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportRemindHeartRatePage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t LABELS_X = 100;\r
-static constexpr uint16_t LABELS_Y = 38;\r
-static constexpr uint16_t LABELS_W = 253;\r
-static constexpr uint16_t LABELS_H = 53;\r
-static constexpr uint16_t LABELS_FONT = 38;\r
-static constexpr uint16_t LIST_X = 20;\r
-static constexpr uint16_t LIST_Y = 100;\r
-static constexpr uint16_t LIST_W = 415;\r
-static constexpr uint16_t LIST_H = 324;\r
-static constexpr uint16_t LIST_ITEM_W = 415;\r
-static constexpr uint16_t LIST_ITEM_H = 108;\r
-static constexpr uint16_t LIST_REBOUND_SIZE = 60;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_REMIND_HEARTRATE, SportRemindHeartRatePage, false);\r
-\r
-static SportRemindHeartRatePage *g_SportRemindHeartRatePageInstance = nullptr;\r
-\r
-static UIView *CreateViewCb(uint8_t type)\r
-{\r
-    SportRemindHeartRateItemView *item = new SportRemindHeartRateItemView();\r
-    if (item == nullptr) {\r
-        return nullptr;\r
-    }\r
-    item->SetPosition(0, 0, LIST_ITEM_W, LIST_ITEM_H);\r
-    item->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    item->SetTouchable(true);\r
-    item->SetOnClickListener(g_SportRemindHeartRatePageInstance);\r
-    return item;\r
-}\r
-\r
-static void UpdateViewCb(UIView *view, void *data, uint8_t type)\r
-{\r
-    if (view == nullptr || data == nullptr) {\r
-        return;\r
-    }\r
-    SportRemindHeartRateItemView *item = dynamic_cast<SportRemindHeartRateItemView *>(view);\r
-    if (item == nullptr) {\r
-        return;\r
-    }\r
-    SportRemindHeartRateItem *itemInfo = static_cast<SportRemindHeartRateItem *>(data);\r
-    item->SetItemInfo(*itemInfo);\r
-}\r
-\r
-SportRemindHeartRatePage::SportRemindHeartRatePage()\r
-{\r
-    g_SportRemindHeartRatePageInstance = this;\r
-}\r
-\r
-SportRemindHeartRatePage::~SportRemindHeartRatePage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (titleLabel_ != nullptr) {\r
-        delete titleLabel_;\r
-        titleLabel_ = nullptr;\r
-    }\r
-    if (remindHeartRateList_ != nullptr) {\r
-        delete remindHeartRateList_;\r
-        remindHeartRateList_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportRemindHeartRatePage::~SportRemindHeartRatePage");\r
-}\r
-\r
-void SportRemindHeartRatePage::CreateUILabel()\r
-{\r
-    titleLabel_ = new UILabel();\r
-    if (titleLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindHeartRatePage titleLabel_ new fail");\r
-        return;\r
-    }\r
-    titleLabel_->SetPosition(LABELS_X, LABELS_Y, LABELS_W, LABELS_H);\r
-    titleLabel_->SetText("心率提醒");\r
-    titleLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleLabel_->SetFont(BOLD_VECTOR_FONT_FILENAME, LABELS_FONT);\r
-    group_->Add(titleLabel_);\r
-}\r
-\r
-void SportRemindHeartRatePage::CreateUIList()\r
-{\r
-    remindHeartRateList_ = new UISimpleList();\r
-    if (remindHeartRateList_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindHeartRatePage remindHeartRateList_ new fail");\r
-        return;\r
-    }\r
-    remindHeartRateList_->SetPosition(LIST_X, LIST_Y, LIST_W, LIST_H);\r
-    remindHeartRateList_->SetThrowDrag(true);\r
-    remindHeartRateList_->SetDraggable(true);\r
-    remindHeartRateList_->SetReboundSize(LIST_REBOUND_SIZE);\r
-    remindHeartRateList_->EnableAutoAlign(true);\r
-    remindHeartRateList_->SetElastic(true);\r
-    remindHeartRateList_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    for (uint8_t i = 0; i < SPORT_REMIND_HEARTRATE_MAX; ++i) {\r
-        Contents content;\r
-        content.createFunc = CreateViewCb;\r
-        content.updateFunc = UpdateViewCb;\r
-        content.type = 0;\r
-        content.data = reinterpret_cast<void *>(&remindHeartRates_[i]);\r
-        remindHeartRateList_->AddContent(content);\r
-    }\r
-    remindHeartRateList_->RefreshList();\r
-    group_->Add(remindHeartRateList_);\r
-}\r
-\r
-void SportRemindHeartRatePage::OnStart(void *data)\r
-{\r
-    group_ = new UIViewGroup();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindHeartRatePage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-\r
-    CreateUILabel();\r
-    CreateUIList();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportRemindHeartRatePage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportRemindHeartRatePage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), SPORT_REMIND_HEARTRATE_ITEM_ENABLE) == 0) {\r
-        sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-        sportInfo->enableHeartRemind = !sportInfo->enableHeartRemind;\r
-        remindHeartRateList_->RefreshList();\r
-        SportModel::GetInstance().SaveConfig(SPORT_CONFIG_INFO);\r
-    } else if (strcmp(view.GetViewId(), SPORT_REMIND_HEARTRATE_ITEM_RANGE) == 0) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_HEARTRATE_RANGE,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindIntervalItemView.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindIntervalItemView.cpp
deleted file mode 100644 (file)
index aab3e77..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindIntervalItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "sport/SportModel.h"\r
-#include "sport/SportRemindIntervalItemView.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t BG_X = 0;\r
-static constexpr uint16_t BG_Y = 6;\r
-static constexpr uint16_t ICON_X = 8;\r
-static constexpr uint16_t ICON_Y = 13;\r
-static constexpr uint16_t LABEL_X = 100;\r
-static constexpr uint16_t LABEL_Y = 31;\r
-static constexpr uint16_t LABEL_W = 179;\r
-static constexpr uint16_t LABEL_H = 37;\r
-static constexpr uint16_t LABEL_FONT = 32;\r
-static constexpr uint16_t IMAGE_X = 370;\r
-static constexpr uint16_t IMAGE_Y = 38;\r
-\r
-SportRemindIntervalItemView::SportRemindIntervalItemView()\r
-{\r
-    bgImage_.SetPosition(BG_X, BG_Y);\r
-    LOADIMG::LoadImageViewImg(&bgImage_, SPORT_IMAGE, IMAGE_SPORT_ITEMBG);\r
-\r
-    icon_.SetPosition(ICON_X, ICON_Y);\r
-\r
-    label_.SetPosition(LABEL_X, LABEL_Y, LABEL_W, LABEL_H);\r
-    label_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-    label_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    label_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    nextImage_.SetPosition(IMAGE_X, IMAGE_Y);\r
-    LOADIMG::LoadImageViewImg(&nextImage_, SPORT_IMAGE, IMAGE_SPORT_NEXT);\r
-\r
-    Add(&bgImage_);\r
-    Add(&icon_);\r
-    Add(&label_);\r
-    Add(&nextImage_);\r
-}\r
-\r
-SportRemindIntervalItemView::~SportRemindIntervalItemView()\r
-{\r
-    Remove(&bgImage_);\r
-    Remove(&icon_);\r
-    Remove(&label_);\r
-    Remove(&nextImage_);\r
-}\r
-\r
-void SportRemindIntervalItemView::SetItemInfo(const SportRemindIntervalItem &itemInfo)\r
-{\r
-    SportType sportType = SportModel::GetInstance().GetSportType();\r
-    if (itemInfo.itemId == SPORT_REMIND_INTERVAL_DISTANCE && sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-        LOADIMG::LoadImageViewImg(&icon_, SPORT_IMAGE, IMAGE_SPORT_LAP);\r
-        label_.SetText("趟数");\r
-        nextImage_.SetVisible(true);\r
-    } else {\r
-        LOADIMG::LoadImageViewImg(&icon_, SPORT_IMAGE, itemInfo.iconId);\r
-        label_.SetText(itemInfo.label);\r
-        nextImage_.SetVisible(true);\r
-    }\r
-    if (itemInfo.itemId == SPORT_REMIND_INTERVAL_NONE) {\r
-        nextImage_.SetVisible(false);\r
-    }\r
-    SetViewId(itemInfo.viewId);\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindIntervalPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindIntervalPage.cpp
deleted file mode 100644 (file)
index fb95d8a..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindIntervalPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportRemindIntervalPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t LABELS_X = 100;\r
-static constexpr uint16_t LABELS_Y = 38;\r
-static constexpr uint16_t LABELS_W = 253;\r
-static constexpr uint16_t LABELS_H = 53;\r
-static constexpr uint16_t LABELS_FONT = 38;\r
-static constexpr uint16_t LIST_X = 20;\r
-static constexpr uint16_t LIST_Y = 100;\r
-static constexpr uint16_t LIST_W = 415;\r
-static constexpr uint16_t LIST_H = 324;\r
-static constexpr uint16_t LIST_ITEM_W = 415;\r
-static constexpr uint16_t LIST_ITEM_H = 108;\r
-static constexpr uint16_t REBOUND_SIZE = 60;\r
-static constexpr uint16_t BLANK_SIZE = 60;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_REMIND_INTERVAL, SportRemindIntervalPage, false);\r
-\r
-static SportRemindIntervalPage *g_SportRemindIntervalPageInstance = nullptr;\r
-\r
-static UIView *CreateViewCb(uint8_t type)\r
-{\r
-    SportRemindIntervalItemView *item = new SportRemindIntervalItemView();\r
-    if (item == nullptr) {\r
-        return nullptr;\r
-    }\r
-    item->SetPosition(0, 0, LIST_ITEM_W, LIST_ITEM_H);\r
-    item->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    item->SetTouchable(true);\r
-    item->SetOnClickListener(g_SportRemindIntervalPageInstance);\r
-    return item;\r
-}\r
-\r
-static void UpdateViewCb(UIView *view, void *data, uint8_t type)\r
-{\r
-    if (view == nullptr || data == nullptr) {\r
-        return;\r
-    }\r
-    SportRemindIntervalItemView *item = dynamic_cast<SportRemindIntervalItemView *>(view);\r
-    if (item == nullptr) {\r
-        return;\r
-    }\r
-    SportRemindIntervalItem *itemInfo = static_cast<SportRemindIntervalItem *>(data);\r
-    item->SetItemInfo(*itemInfo);\r
-}\r
-\r
-SportRemindIntervalPage::SportRemindIntervalPage()\r
-{\r
-    g_SportRemindIntervalPageInstance = this;\r
-}\r
-\r
-SportRemindIntervalPage::~SportRemindIntervalPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (background_ != nullptr) {\r
-        delete background_;\r
-        background_ = nullptr;\r
-    }\r
-    if (titleLabel_ != nullptr) {\r
-        delete titleLabel_;\r
-        titleLabel_ = nullptr;\r
-    }\r
-    if (remindIntervalList_ != nullptr) {\r
-        delete remindIntervalList_;\r
-        remindIntervalList_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportRemindIntervalPage::~SportRemindIntervalPage");\r
-}\r
-\r
-void SportRemindIntervalPage::InitBackgroundView()\r
-{\r
-    background_ = new UIImageView();\r
-    if (background_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindIntervalPage background_ new fail");\r
-        return;\r
-    }\r
-    background_->SetPosition(0, 0);\r
-    LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG);\r
-    group_->Add(background_);\r
-}\r
-\r
-void SportRemindIntervalPage::CreateUILabel()\r
-{\r
-    titleLabel_ = new UILabel();\r
-    if (titleLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindIntervalPage titleLabel_ new fail");\r
-        return;\r
-    }\r
-    titleLabel_->SetPosition(LABELS_X, LABELS_Y, LABELS_W, LABELS_H);\r
-    titleLabel_->SetText("间隔提醒");\r
-    titleLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleLabel_->SetFont(BOLD_VECTOR_FONT_FILENAME, LABELS_FONT);\r
-    group_->Add(titleLabel_);\r
-}\r
-\r
-void SportRemindIntervalPage::CreateUIList()\r
-{\r
-    remindIntervalList_ = new UISimpleList();\r
-    if (remindIntervalList_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindIntervalPage remindIntervalList_ new fail");\r
-        return;\r
-    }\r
-    remindIntervalList_->SetPosition(LIST_X, LIST_Y, LIST_W, LIST_H);\r
-    remindIntervalList_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    remindIntervalList_->SetBoundaryIntercept(DragEvent::DIRECTION_TOP_TO_BOTTOM, false);\r
-    remindIntervalList_->SetBoundaryIntercept(DragEvent::DIRECTION_BOTTOM_TO_TOP, false);\r
-\r
-    for (uint8_t i = 0; i < SPORT_REMIND_INTERVAL_MAX; ++i) {\r
-        Contents content;\r
-        content.createFunc = CreateViewCb;\r
-        content.updateFunc = UpdateViewCb;\r
-        content.type = 0;\r
-        content.data = reinterpret_cast<void *>(&remindIntervals_[i]);\r
-        remindIntervalList_->AddContent(content);\r
-    }\r
-    remindIntervalList_->RefreshList();\r
-    group_->Add(remindIntervalList_);\r
-}\r
-\r
-void SportRemindIntervalPage::OnStart(void *data)\r
-{\r
-    group_ = new UIScrollView();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindIntervalPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-    group_->SetReboundSize(REBOUND_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-    group_->SetScrollBlankSize(BLANK_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-\r
-    InitBackgroundView();\r
-    CreateUILabel();\r
-    CreateUIList();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportRemindIntervalPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportRemindIntervalPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (strcmp(view.GetViewId(), SPORT_REMIND_INTERVAL_ITEM_DISTANCE) == 0) {\r
-        sportInfo->setType = SPORT_SET_TYPE_REMIND;\r
-        sportInfo->remindTypeTemp = sportInfo->remindType;\r
-        sportInfo->remindType = SPORT_REMIND_INTERVAL_DISTANCE;\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_SETTING,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    } else if (strcmp(view.GetViewId(), SPORT_REMIND_INTERVAL_ITEM_TIME) == 0) {\r
-        sportInfo->setType = SPORT_SET_TYPE_REMIND;\r
-        sportInfo->remindTypeTemp = sportInfo->remindType;\r
-        sportInfo->remindType = SPORT_REMIND_INTERVAL_TIME;\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_SETTING,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    } else if (strcmp(view.GetViewId(), SPORT_REMIND_INTERVAL_ITEM_NONE) == 0) {\r
-        sportInfo->remindTypeTemp = sportInfo->remindType;\r
-        sportInfo->remindType = SPORT_REMIND_INTERVAL_NONE;\r
-        SportModel::GetInstance().SaveConfig(SPORT_CONFIG_INFO);\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindItemView.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindItemView.cpp
deleted file mode 100644 (file)
index fc2276a..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "sport/SportModel.h"\r
-#include "sport/SportRemindItemView.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t BG_X = 0;\r
-static constexpr uint16_t BG_Y = 6;\r
-static constexpr uint16_t ICON_X = 8;\r
-static constexpr uint16_t ICON_Y = 13;\r
-static constexpr uint16_t LABEL_X = 100;\r
-static constexpr uint16_t LABEL_Y = 17;\r
-static constexpr uint16_t LABEL_W = 207;\r
-static constexpr uint16_t LABEL_H = 39;\r
-static constexpr uint16_t LABEL_FONT = 32;\r
-static constexpr uint16_t HITS_X = 100;\r
-static constexpr uint16_t HITS_Y = 60;\r
-static constexpr uint16_t HITS_W = 176;\r
-static constexpr uint16_t HITS_H = 29;\r
-static constexpr uint16_t HITS_FONT = 24;\r
-static constexpr uint16_t IMAGE_X = 370;\r
-static constexpr uint16_t IMAGE_Y = 38;\r
-\r
-SportRemindItemView::SportRemindItemView()\r
-{\r
-    bgImage_.SetPosition(BG_X, BG_Y);\r
-    LOADIMG::LoadImageViewImg(&bgImage_, SPORT_IMAGE, IMAGE_SPORT_ITEMBG);\r
-\r
-    icon_.SetPosition(ICON_X, ICON_Y);\r
-\r
-    label_.SetPosition(LABEL_X, LABEL_Y, LABEL_W, LABEL_H);\r
-    label_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-    label_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    label_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    hits_.SetPosition(HITS_X, HITS_Y, HITS_W, HITS_H);\r
-    hits_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, HITS_FONT);\r
-    hits_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    hits_.SetStyle(STYLE_TEXT_COLOR, Color::Gray().full);\r
-    hits_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    nextImage_.SetPosition(IMAGE_X, IMAGE_Y);\r
-    LOADIMG::LoadImageViewImg(&nextImage_, SPORT_IMAGE, IMAGE_SPORT_NEXT);\r
-\r
-    Add(&bgImage_);\r
-    Add(&icon_);\r
-    Add(&label_);\r
-    Add(&hits_);\r
-    Add(&nextImage_);\r
-}\r
-\r
-SportRemindItemView::~SportRemindItemView()\r
-{\r
-    Remove(&bgImage_);\r
-    Remove(&icon_);\r
-    Remove(&label_);\r
-    Remove(&hits_);\r
-    Remove(&nextImage_);\r
-}\r
-\r
-void SportRemindItemView::SetItemInfo(const SportRemindItem &itemInfo)\r
-{\r
-    LOADIMG::LoadImageViewImg(&icon_, SPORT_IMAGE, itemInfo.iconId);\r
-    label_.SetText(itemInfo.label);\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (itemInfo.itemId == SPORT_REMIND_INTERVAL) {\r
-        if (sportInfo->remindType == SPORT_REMIND_INTERVAL_NONE || !sportInfo->isRemindSetted) {\r
-            hits_.SetText("无提醒");\r
-        } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_DISTANCE) {\r
-            SportType sportType = SportModel::GetInstance().GetSportType();\r
-            if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-                hits_.SetText((std::to_string(sportInfo->remindValue) + "趟").c_str());\r
-            } else {\r
-                hits_.SetText((std::to_string(sportInfo->remindValue) + "km").c_str());\r
-            }\r
-        } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_TIME) {\r
-            hits_.SetText((std::to_string(sportInfo->remindValue) + "分钟").c_str());\r
-        }\r
-    } else if (itemInfo.itemId == SPORT_REMIND_HEARTRATE) {\r
-        if (!sportInfo->enableHeartRemind) {\r
-            hits_.SetText("关闭");\r
-        } else {\r
-            hits_.SetText("开启");\r
-        }\r
-    }\r
-    SetViewId(itemInfo.viewId);\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportRemindPage.cpp
deleted file mode 100644 (file)
index 84fe66d..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportRemindPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportRemindPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t LABELS_X = 100;\r
-static constexpr uint16_t LABELS_Y = 38;\r
-static constexpr uint16_t LABELS_W = 253;\r
-static constexpr uint16_t LABELS_H = 53;\r
-static constexpr uint16_t LABELS_FONT = 38;\r
-static constexpr uint16_t LIST_X = 20;\r
-static constexpr uint16_t LIST_Y = 100;\r
-static constexpr uint16_t LIST_W = 415;\r
-static constexpr uint16_t LIST_H = 324;\r
-static constexpr uint16_t LIST_ITEM_W = 415;\r
-static constexpr uint16_t LIST_ITEM_H = 108;\r
-static constexpr uint16_t LIST_REBOUND_SIZE = 60;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_REMIND, SportRemindPage, false);\r
-\r
-static SportRemindPage *g_SportRemindPageInstance = nullptr;\r
-\r
-static UIView *CreateViewCb(uint8_t type)\r
-{\r
-    SportRemindItemView *item = new SportRemindItemView();\r
-    if (item == nullptr) {\r
-        return nullptr;\r
-    }\r
-    item->SetPosition(0, 0, LIST_ITEM_W, LIST_ITEM_H);\r
-    item->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    item->SetTouchable(true);\r
-    item->SetOnClickListener(g_SportRemindPageInstance);\r
-    return item;\r
-}\r
-\r
-static void UpdateViewCb(UIView *view, void *data, uint8_t type)\r
-{\r
-    if (view == nullptr || data == nullptr) {\r
-        return;\r
-    }\r
-    SportRemindItemView *item = dynamic_cast<SportRemindItemView *>(view);\r
-    if (item == nullptr) {\r
-        return;\r
-    }\r
-    SportRemindItem *itemInfo = static_cast<SportRemindItem *>(data);\r
-    item->SetItemInfo(*itemInfo);\r
-}\r
-\r
-SportRemindPage::SportRemindPage()\r
-{\r
-    g_SportRemindPageInstance = this;\r
-}\r
-\r
-SportRemindPage::~SportRemindPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (background_ != nullptr) {\r
-        delete background_;\r
-        background_ = nullptr;\r
-    }\r
-    if (titleLabel_ != nullptr) {\r
-        delete titleLabel_;\r
-        titleLabel_ = nullptr;\r
-    }\r
-    if (remindList_ != nullptr) {\r
-        delete remindList_;\r
-        remindList_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportRemindPage::~SportRemindPage");\r
-}\r
-\r
-void SportRemindPage::InitBackgroundView()\r
-{\r
-    background_ = new UIImageView();\r
-    if (background_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindPage background_ new fail");\r
-        return;\r
-    }\r
-    background_->SetPosition(0, 0);\r
-    LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG);\r
-    group_->Add(background_);\r
-}\r
-\r
-void SportRemindPage::CreateUILabel()\r
-{\r
-    titleLabel_ = new UILabel();\r
-    if (titleLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindPage titleLabel_ new fail");\r
-        return;\r
-    }\r
-    titleLabel_->SetPosition(LABELS_X, LABELS_Y, LABELS_W, LABELS_H);\r
-    titleLabel_->SetText("提醒");\r
-    titleLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleLabel_->SetFont(BOLD_VECTOR_FONT_FILENAME, LABELS_FONT);\r
-    group_->Add(titleLabel_);\r
-}\r
-\r
-void SportRemindPage::CreateUIList()\r
-{\r
-    remindList_ = new UISimpleList();\r
-    if (remindList_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindPage remindList_ new fail");\r
-        return;\r
-    }\r
-    remindList_->SetPosition(LIST_X, LIST_Y, LIST_W, LIST_H);\r
-    remindList_->SetThrowDrag(true);\r
-    remindList_->SetDraggable(true);\r
-    remindList_->SetReboundSize(LIST_REBOUND_SIZE);\r
-    remindList_->EnableAutoAlign(true);\r
-    remindList_->SetElastic(true);\r
-    remindList_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    for (uint8_t i = 0; i < SPORT_REMIND_MAX; ++i) {\r
-        Contents content;\r
-        content.createFunc = CreateViewCb;\r
-        content.updateFunc = UpdateViewCb;\r
-        content.type = 0;\r
-        content.data = reinterpret_cast<void *>(&reminds_[i]);\r
-        remindList_->AddContent(content);\r
-    }\r
-    remindList_->RefreshList();\r
-    group_->Add(remindList_);\r
-}\r
-\r
-void SportRemindPage::OnStart(void *data)\r
-{\r
-    group_ = new UIViewGroup();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportRemindPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-\r
-    InitBackgroundView();\r
-    CreateUILabel();\r
-    CreateUIList();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportRemindPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_SETTINGS,\r
-                TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportRemindPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), SPORT_REMIND_ITEM_INTERVAL) == 0) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND_INTERVAL,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    } else if (strcmp(view.GetViewId(), SPORT_REMIND_ITEM_HEARTRATE) == 0) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND_HEARTRATE,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportSettingsItemView.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportSettingsItemView.cpp
deleted file mode 100644 (file)
index 0a8a572..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportSettingsItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "sport/SportModel.h"\r
-#include "sport/SportSettingsItemView.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t BG_X = 0;\r
-static constexpr uint16_t BG_Y = 6;\r
-static constexpr uint16_t ICON_X = 8;\r
-static constexpr uint16_t ICON_Y = 13;\r
-static constexpr uint16_t LABEL_X = 100;\r
-static constexpr uint16_t LABEL_Y1 = 17;\r
-static constexpr uint16_t LABEL_Y2 = 31;\r
-static constexpr uint16_t LABEL_W = 207;\r
-static constexpr uint16_t LABEL_H = 39;\r
-static constexpr uint16_t LABEL_FONT = 32;\r
-static constexpr uint16_t HITS_X = 100;\r
-static constexpr uint16_t HITS_Y = 60;\r
-static constexpr uint16_t HITS_W = 176;\r
-static constexpr uint16_t HITS_H = 29;\r
-static constexpr uint16_t HITS_FONT = 24;\r
-static constexpr uint16_t IMAGE_X = 370;\r
-static constexpr uint16_t IMAGE_Y = 38;\r
-\r
-SportSettingsItemView::SportSettingsItemView()\r
-{\r
-    bgImage_.SetPosition(BG_X, BG_Y);\r
-    LOADIMG::LoadImageViewImg(&bgImage_, SPORT_IMAGE, IMAGE_SPORT_ITEMBG);\r
-\r
-    icon_.SetPosition(ICON_X, ICON_Y);\r
-\r
-    label_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-    label_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    label_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    hits_.SetPosition(HITS_X, HITS_Y, HITS_W, HITS_H);\r
-    hits_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, HITS_FONT);\r
-    hits_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    hits_.SetStyle(STYLE_TEXT_COLOR, Color::Gray().full);\r
-    hits_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    nextImage_.SetPosition(IMAGE_X, IMAGE_Y);\r
-    LOADIMG::LoadImageViewImg(&nextImage_, SPORT_IMAGE, IMAGE_SPORT_NEXT);\r
-\r
-    Add(&bgImage_);\r
-    Add(&icon_);\r
-    Add(&label_);\r
-    Add(&hits_);\r
-    Add(&nextImage_);\r
-}\r
-\r
-SportSettingsItemView::~SportSettingsItemView()\r
-{\r
-    Remove(&bgImage_);\r
-    Remove(&icon_);\r
-    Remove(&label_);\r
-    Remove(&hits_);\r
-    Remove(&nextImage_);\r
-}\r
-\r
-void SportSettingsItemView::SetItemInfo(const SportSettingsItem &itemInfo)\r
-{\r
-    LOADIMG::LoadImageViewImg(&icon_, SPORT_IMAGE, itemInfo.iconId);\r
-    label_.SetText(itemInfo.label);\r
-    SetViewId(itemInfo.viewId);\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (itemInfo.itemId == SPORT_SET_TYPE_TARGET) {\r
-        label_.SetPosition(LABEL_X, LABEL_Y1, LABEL_W, LABEL_H);\r
-        hits_.SetVisible(true);\r
-        if (!sportInfo->isTargetSetted) {\r
-            hits_.SetText("无目标");\r
-        } else if (sportInfo->targetType == SPORT_TARGET_DISTANCE) {\r
-            SportType sportType = SportModel::GetInstance().GetSportType();\r
-            if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-                hits_.SetText((std::to_string(sportInfo->targetValue) + "趟").c_str());\r
-            } else {\r
-                hits_.SetText((std::to_string(sportInfo->targetValue) + "km").c_str());\r
-            }\r
-        } else if (sportInfo->targetType == SPORT_TARGET_TIME) {\r
-            hits_.SetText((std::to_string(sportInfo->targetValue) + "分钟").c_str());\r
-        } else if (sportInfo->targetType == SPORT_TARGET_CALORIE) {\r
-            hits_.SetText((std::to_string(sportInfo->targetValue) + "千卡").c_str());\r
-        }\r
-    } else if (itemInfo.itemId == SPORT_SET_TYPE_REMIND) {\r
-        label_.SetPosition(LABEL_X, LABEL_Y1, LABEL_W, LABEL_H);\r
-        hits_.SetVisible(true);\r
-        if (sportInfo->remindType == SPORT_REMIND_INTERVAL_DISTANCE) {\r
-            SportType sportType = SportModel::GetInstance().GetSportType();\r
-            if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-                hits_.SetText((std::to_string(sportInfo->remindValue) + "趟").c_str());\r
-            } else {\r
-                hits_.SetText((std::to_string(sportInfo->remindValue) + "km").c_str());\r
-            }\r
-        } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_TIME) {\r
-            hits_.SetText((std::to_string(sportInfo->remindValue) + "分钟").c_str());\r
-        } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_NONE || !sportInfo->isRemindSetted) {\r
-            if (sportInfo->enableHeartRemind) {\r
-                hits_.SetText(GetHeartRateRangeDescription(sportInfo->heartRange));\r
-            } else {\r
-                hits_.SetText("无提醒");\r
-            }\r
-        }\r
-    } else if (itemInfo.itemId == SPORT_SET_TYPE_MISTOUCH) {\r
-        label_.SetPosition(LABEL_X, LABEL_Y2, LABEL_W, LABEL_H);\r
-        hits_.SetVisible(false);\r
-    }\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportSettingsPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportSettingsPage.cpp
deleted file mode 100644 (file)
index 8a5c852..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportSettingsPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportSettingsPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t LABELS_X = 100;\r
-static constexpr uint16_t LABELS_Y = 38;\r
-static constexpr uint16_t LABELS_W = 253;\r
-static constexpr uint16_t LABELS_H = 53;\r
-static constexpr uint16_t LABELS_FONT = 38;\r
-static constexpr uint16_t LIST_X = 20;\r
-static constexpr uint16_t LIST_Y = 100;\r
-static constexpr uint16_t LIST_W = 415;\r
-static constexpr uint16_t LIST_H = 324;\r
-static constexpr uint16_t LIST_ITEM_W = 415;\r
-static constexpr uint16_t LIST_ITEM_H = 108;\r
-static constexpr uint16_t REBOUND_SIZE = 60;\r
-static constexpr uint16_t BLANK_SIZE = 60;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_SETTINGS, SportSettingsPage, false);\r
-\r
-static SportSettingsPage *g_SportSettingsPageInstance = nullptr;\r
-\r
-static UIView *CreateViewCb(uint8_t type)\r
-{\r
-    SportSettingsItemView *item = new SportSettingsItemView();\r
-    if (item == nullptr) {\r
-        return nullptr;\r
-    }\r
-    item->SetPosition(0, 0, LIST_ITEM_W, LIST_ITEM_H);\r
-    item->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    item->SetTouchable(true);\r
-    item->SetOnClickListener(g_SportSettingsPageInstance);\r
-    return item;\r
-}\r
-\r
-static void UpdateViewCb(UIView *view, void *data, uint8_t type)\r
-{\r
-    if (view == nullptr || data == nullptr) {\r
-        return;\r
-    }\r
-    SportSettingsItemView *item = dynamic_cast<SportSettingsItemView *>(view);\r
-    if (item == nullptr) {\r
-        return;\r
-    }\r
-    SportSettingsItem *itemInfo = static_cast<SportSettingsItem *>(data);\r
-    item->SetItemInfo(*itemInfo);\r
-}\r
-\r
-SportSettingsPage::SportSettingsPage()\r
-{\r
-    g_SportSettingsPageInstance = this;\r
-}\r
-\r
-SportSettingsPage::~SportSettingsPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (background_ != nullptr) {\r
-        delete background_;\r
-        background_ = nullptr;\r
-    }\r
-    if (titleLabel_ != nullptr) {\r
-        delete titleLabel_;\r
-        titleLabel_ = nullptr;\r
-    }\r
-    if (settingList_ != nullptr) {\r
-        delete settingList_;\r
-        settingList_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportSettingsPage::~SportSettingsPage");\r
-}\r
-\r
-void SportSettingsPage::InitBackgroundView()\r
-{\r
-    background_ = new UIImageView();\r
-    if (background_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportSettingsPage background_ new fail");\r
-        return;\r
-    }\r
-    background_->SetPosition(0, 0);\r
-    LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG);\r
-    group_->Add(background_);\r
-}\r
-\r
-void SportSettingsPage::CreateUILabel()\r
-{\r
-    titleLabel_ = new UILabel();\r
-    if (titleLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportSettingsPage titleLabel_ new fail");\r
-        return;\r
-    }\r
-    titleLabel_->SetPosition(LABELS_X, LABELS_Y, LABELS_W, LABELS_H);\r
-    titleLabel_->SetText("设置");\r
-    titleLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleLabel_->SetFont(BOLD_VECTOR_FONT_FILENAME, LABELS_FONT);\r
-    group_->Add(titleLabel_);\r
-}\r
-\r
-void SportSettingsPage::CreateUIList()\r
-{\r
-    settingList_ = new UISimpleList();\r
-    if (settingList_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportSettingsPage settingList_ new fail");\r
-        return;\r
-    }\r
-    settingList_->SetPosition(LIST_X, LIST_Y, LIST_W, LIST_H);\r
-    settingList_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    settingList_->SetBoundaryIntercept(DragEvent::DIRECTION_TOP_TO_BOTTOM, false);\r
-    settingList_->SetBoundaryIntercept(DragEvent::DIRECTION_BOTTOM_TO_TOP, false);\r
-\r
-    for (uint8_t i = 0; i < SPORT_SET_TYPE_MAX; ++i) {\r
-        Contents content;\r
-        content.createFunc = CreateViewCb;\r
-        content.updateFunc = UpdateViewCb;\r
-        content.type = 0;\r
-        content.data = reinterpret_cast<void *>(&settings_[i]);\r
-        settingList_->AddContent(content);\r
-    }\r
-    settingList_->RefreshList();\r
-    group_->Add(settingList_);\r
-}\r
-\r
-void SportSettingsPage::OnStart(void *data)\r
-{\r
-    group_ = new UIScrollView();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportSettingsPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-    group_->SetReboundSize(REBOUND_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-    group_->SetScrollBlankSize(BLANK_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-\r
-    InitBackgroundView();\r
-    CreateUILabel();\r
-    CreateUIList();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportSettingsPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_MENU,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportSettingsPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), SETTINGS_ITEM_TARGET) == 0) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    } else if (strcmp(view.GetViewId(), SETTINGS_ITEM_REMIND) == 0) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    } else if (strcmp(view.GetViewId(), SETTINGS_ITEM_MISTOUCH) == 0) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_MISTOUCH,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetItemView.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetItemView.cpp
deleted file mode 100644 (file)
index 2afb640..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportTargetItemView\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "sport/SportModel.h"\r
-#include "sport/SportTargetItemView.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t BG_X = 0;\r
-static constexpr uint16_t BG_Y = 6;\r
-static constexpr uint16_t ICON_X = 8;\r
-static constexpr uint16_t ICON_Y = 13;\r
-static constexpr uint16_t LABEL_X = 100;\r
-static constexpr uint16_t LABEL_Y = 31;\r
-static constexpr uint16_t LABEL_W = 179;\r
-static constexpr uint16_t LABEL_H = 37;\r
-static constexpr uint16_t LABEL_FONT = 32;\r
-static constexpr uint16_t IMAGE_X = 370;\r
-static constexpr uint16_t IMAGE_Y = 38;\r
-\r
-SportTargetItemView::SportTargetItemView()\r
-{\r
-    bgImage_.SetPosition(BG_X, BG_Y);\r
-    LOADIMG::LoadImageViewImg(&bgImage_, SPORT_IMAGE, IMAGE_SPORT_ITEMBG);\r
-\r
-    icon_.SetPosition(ICON_X, ICON_Y);\r
-\r
-    label_.SetPosition(LABEL_X, LABEL_Y, LABEL_W, LABEL_H);\r
-    label_.SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-    label_.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);\r
-    label_.SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-\r
-    nextImage_.SetPosition(IMAGE_X, IMAGE_Y);\r
-    LOADIMG::LoadImageViewImg(&nextImage_, SPORT_IMAGE, IMAGE_SPORT_NEXT);\r
-\r
-    Add(&bgImage_);\r
-    Add(&icon_);\r
-    Add(&label_);\r
-    Add(&nextImage_);\r
-}\r
-\r
-SportTargetItemView::~SportTargetItemView()\r
-{\r
-    Remove(&bgImage_);\r
-    Remove(&icon_);\r
-    Remove(&label_);\r
-    Remove(&nextImage_);\r
-}\r
-\r
-void SportTargetItemView::SetItemInfo(const SportTargetItem &itemInfo)\r
-{\r
-    SportType sportType = SportModel::GetInstance().GetSportType();\r
-    if (itemInfo.itemId == SPORT_TARGET_DISTANCE && sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-        LOADIMG::LoadImageViewImg(&icon_, SPORT_IMAGE, IMAGE_SPORT_LAP);\r
-        label_.SetText("趟数");\r
-    } else {\r
-        LOADIMG::LoadImageViewImg(&icon_, SPORT_IMAGE, itemInfo.iconId);\r
-        label_.SetText(itemInfo.label);\r
-    }\r
-    SetViewId(itemInfo.viewId);\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetPage.cpp
deleted file mode 100644 (file)
index 91e7843..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportTargetPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportTargetPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t LABELS_X = 100;\r
-static constexpr uint16_t LABELS_Y = 38;\r
-static constexpr uint16_t LABELS_W = 253;\r
-static constexpr uint16_t LABELS_H = 53;\r
-static constexpr uint16_t LABELS_FONT = 38;\r
-static constexpr uint16_t LIST_X = 20;\r
-static constexpr uint16_t LIST_Y = 100;\r
-static constexpr uint16_t LIST_W = 415;\r
-static constexpr uint16_t LIST_H = 324;\r
-static constexpr uint16_t LIST_ITEM_W = 415;\r
-static constexpr uint16_t LIST_ITEM_H = 108;\r
-static constexpr uint16_t REBOUND_SIZE = 60;\r
-static constexpr uint16_t BLANK_SIZE = 60;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_TARGET, SportTargetPage, false);\r
-\r
-static SportTargetPage *g_SportTargetPageInstance = nullptr;\r
-\r
-static UIView *CreateViewCb(uint8_t type)\r
-{\r
-    SportTargetItemView *item = new SportTargetItemView();\r
-    if (item == nullptr) {\r
-        return nullptr;\r
-    }\r
-    item->SetPosition(0, 0, LIST_ITEM_W, LIST_ITEM_H);\r
-    item->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    item->SetTouchable(true);\r
-    item->SetOnClickListener(g_SportTargetPageInstance);\r
-    return item;\r
-}\r
-\r
-static void UpdateViewCb(UIView *view, void *data, uint8_t type)\r
-{\r
-    if (view == nullptr || data == nullptr) {\r
-        return;\r
-    }\r
-    SportTargetItemView *item = dynamic_cast<SportTargetItemView *>(view);\r
-    if (item == nullptr) {\r
-        return;\r
-    }\r
-    SportTargetItem *itemInfo = static_cast<SportTargetItem *>(data);\r
-    item->SetItemInfo(*itemInfo);\r
-}\r
-\r
-SportTargetPage::SportTargetPage()\r
-{\r
-    g_SportTargetPageInstance = this;\r
-}\r
-\r
-SportTargetPage::~SportTargetPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (background_ != nullptr) {\r
-        delete background_;\r
-        background_ = nullptr;\r
-    }\r
-    if (titleLabel_ != nullptr) {\r
-        delete titleLabel_;\r
-        titleLabel_ = nullptr;\r
-    }\r
-    if (targetList_ != nullptr) {\r
-        delete targetList_;\r
-        targetList_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportTargetPage::~SportTargetPage");\r
-}\r
-\r
-void SportTargetPage::InitBackgroundView()\r
-{\r
-    background_ = new UIImageView();\r
-    if (background_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPage background_ new fail");\r
-        return;\r
-    }\r
-    background_->SetPosition(0, 0);\r
-    LOADIMG::LoadImageViewImg(background_, SPORT_IMAGE, IMAGE_SPORT_BG);\r
-    group_->Add(background_);\r
-}\r
-\r
-void SportTargetPage::CreateUILabel()\r
-{\r
-    titleLabel_ = new UILabel();\r
-    if (titleLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPage titleLabel_ new fail");\r
-        return;\r
-    }\r
-    titleLabel_->SetPosition(LABELS_X, LABELS_Y, LABELS_W, LABELS_H);\r
-    titleLabel_->SetText("目标");\r
-    titleLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleLabel_->SetFont(BOLD_VECTOR_FONT_FILENAME, LABELS_FONT);\r
-    group_->Add(titleLabel_);\r
-}\r
-\r
-void SportTargetPage::CreateUIList()\r
-{\r
-    targetList_ = new UISimpleList();\r
-    if (targetList_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPage targetList_ new fail");\r
-        return;\r
-    }\r
-    targetList_->SetPosition(LIST_X, LIST_Y, LIST_W, LIST_H);\r
-    targetList_->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT);\r
-    targetList_->SetBoundaryIntercept(DragEvent::DIRECTION_TOP_TO_BOTTOM, false);\r
-    targetList_->SetBoundaryIntercept(DragEvent::DIRECTION_BOTTOM_TO_TOP, false);\r
-\r
-    for (uint8_t i = 0; i < SPORT_TARGET_MAX; ++i) {\r
-        Contents content;\r
-        content.createFunc = CreateViewCb;\r
-        content.updateFunc = UpdateViewCb;\r
-        content.type = 0;\r
-        content.data = reinterpret_cast<void *>(&targets_[i]);\r
-        targetList_->AddContent(content);\r
-    }\r
-    targetList_->RefreshList();\r
-    group_->Add(targetList_);\r
-}\r
-\r
-void SportTargetPage::OnStart(void *data)\r
-{\r
-    group_ = new UIScrollView();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-    group_->SetReboundSize(REBOUND_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-    group_->SetScrollBlankSize(BLANK_SIZE, UIAbstractScroll::Direction::BOTTOM);\r
-\r
-    InitBackgroundView();\r
-    CreateUILabel();\r
-    CreateUIList();\r
-    AddViewToPageContainer(group_);\r
-}\r
-\r
-bool SportTargetPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_SETTINGS,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportTargetPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    sportInfo->setType = SPORT_SET_TYPE_TARGET;\r
-    if (strcmp(view.GetViewId(), SPORT_TARGET_ITEM_DISTANCE) == 0) {\r
-        sportInfo->targetTypeTemp = sportInfo->targetType;\r
-        sportInfo->targetType = SPORT_TARGET_DISTANCE;\r
-    } else if (strcmp(view.GetViewId(), SPORT_TARGET_ITEM_TIME) == 0) {\r
-        sportInfo->targetTypeTemp = sportInfo->targetType;\r
-        sportInfo->targetType = SPORT_TARGET_TIME;\r
-    } else if (strcmp(view.GetViewId(), SPORT_TARGET_ITEM_CALORIE) == 0) {\r
-        sportInfo->targetTypeTemp = sportInfo->targetType;\r
-        sportInfo->targetType = SPORT_TARGET_CALORIE;\r
-    }\r
-    NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET_SETTING,\r
-        TransitionType::TRANSITION_INVALID, false);\r
-    return true;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetPromptPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetPromptPage.cpp
deleted file mode 100644 (file)
index 2c5c211..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportTargetPromptPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include <sys/time.h>\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportTargetPromptPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t PAGE_VISIBLE_SECOND = 3;\r
-static constexpr uint16_t PROMPT_DISTANCE_INDEX = 0;\r
-static constexpr uint16_t PROMPT_TIME_INDEX = 1;\r
-static constexpr uint16_t PROMPT_LAP_INDEX = 2;\r
-static constexpr uint16_t IMAGE_X = 46;\r
-static constexpr uint16_t IMAGE_Y = 72;\r
-static constexpr uint16_t IMAGE_COMPLETE_X = 85;\r
-static constexpr uint16_t IMAGE_COMPLETE_Y = 32;\r
-static constexpr uint16_t IMAGE_HEART_X = 167;\r
-static constexpr uint16_t IMAGE_HEART_Y = 118;\r
-static constexpr uint16_t LABEL_X = 25;\r
-static constexpr uint16_t LABEL_Y = 250;\r
-static constexpr uint16_t LABEL_W = 404;\r
-static constexpr uint16_t LABEL_H = 49;\r
-static constexpr uint16_t LABEL_FONT = 36;\r
-static const char *PROMPT_HALF_CONTENT = "本次运动目标已完成50%";\r
-static const char *PROMPT_FINISH_CONTENT = "本次运动目标已完成";\r
-static const int PROPMT_IMAGES[][10] = {\r
-    {IMAGE_SPORT_1KM, IMAGE_SPORT_3KM, IMAGE_SPORT_5KM, IMAGE_SPORT_7KM, IMAGE_SPORT_10KM, IMAGE_SPORT_15KM,\r
-     IMAGE_SPORT_20KM, IMAGE_SPORT_25KM, IMAGE_SPORT_30KM, IMAGE_SPORT_40KM},\r
-    {IMAGE_SPORT_10MIN, IMAGE_SPORT_20MIN, IMAGE_SPORT_30MIN, IMAGE_SPORT_60MIN, IMAGE_SPORT_120MIN, IMAGE_SPORT_180MIN,\r
-     IMAGE_SPORT_200MIN},\r
-    {IMAGE_SPORT_LAP1, IMAGE_SPORT_LAP2, IMAGE_SPORT_LAP4, IMAGE_SPORT_LAP6, IMAGE_SPORT_LAP8, IMAGE_SPORT_LAP10,\r
-     IMAGE_SPORT_LAP12, IMAGE_SPORT_LAP16, IMAGE_SPORT_LAP20, IMAGE_SPORT_LAP30},\r
-};\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_TARGET_PROMPT, SportTargetPromptPage, false);\r
-\r
-void SportTargetPromptPage::SportPromptAnimatorCallback::Callback(UIView *view)\r
-{\r
-    UNUSED(view);\r
-\r
-    time_t now = time(nullptr);\r
-    if (now - page_->startTime_ > PAGE_VISIBLE_SECOND) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_DATA,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-}\r
-\r
-SportTargetPromptPage::~SportTargetPromptPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (promptIcon_ != nullptr) {\r
-        delete promptIcon_;\r
-        promptIcon_ = nullptr;\r
-    }\r
-    if (promptLabel_ != nullptr) {\r
-        delete promptLabel_;\r
-        promptLabel_ = nullptr;\r
-    }\r
-    if (animator_ != nullptr) {\r
-        delete animator_;\r
-        animator_ = nullptr;\r
-    }\r
-    if (callback_ != nullptr) {\r
-        delete callback_;\r
-        callback_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportTargetPromptPage::~SportTargetPromptPage");\r
-}\r
-\r
-void SportTargetPromptPage::CreatePromptView()\r
-{\r
-    promptIcon_ = new UIImageView();\r
-    if (promptIcon_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPromptPage promptIcon_ new fail");\r
-        return;\r
-    }\r
-    promptIcon_->SetPosition(IMAGE_X, IMAGE_Y);\r
-    group_->Add(promptIcon_);\r
-\r
-    promptLabel_ = new UILabel();\r
-    if (promptLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPromptPage promptLabel_ new fail");\r
-        return;\r
-    }\r
-    promptLabel_->SetPosition(LABEL_X, LABEL_Y, LABEL_W, LABEL_H);\r
-    promptLabel_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT);\r
-    promptLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    group_->Add(promptLabel_);\r
-\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (sportInfo->promptType == SPORT_SET_TYPE_TARGET) {\r
-        if (sportInfo->targetComplete) {\r
-            promptLabel_->SetText(PROMPT_FINISH_CONTENT);\r
-            promptIcon_->SetPosition(IMAGE_COMPLETE_X, IMAGE_COMPLETE_Y);\r
-            LOADIMG::LoadImageViewImg(promptIcon_, SPORT_IMAGE, IMAGE_SPORT_FINISH);\r
-        } else if (sportInfo->targetHalf) {\r
-            promptLabel_->SetText(PROMPT_HALF_CONTENT);\r
-            LOADIMG::LoadImageViewImg(promptIcon_, SPORT_IMAGE, IMAGE_SPORT_HALF);\r
-        }\r
-    } else if (sportInfo->promptType == SPORT_SET_TYPE_REMIND) {\r
-        std::string promptStr;\r
-        if (sportInfo->remindType == SPORT_REMIND_INTERVAL_DISTANCE) {\r
-            SportType sportType = SportModel::GetInstance().GetSportType();\r
-            if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-                promptStr = "第" + std::to_string(sportInfo->remindTimes) + "个" +\r
-                            std::to_string(sportInfo->remindValue) + "趟已完成!";\r
-                promptLabel_->SetText(promptStr.c_str());\r
-                LOADIMG::LoadImageViewImg(promptIcon_, SPORT_IMAGE,\r
-                                          PROPMT_IMAGES[PROMPT_LAP_INDEX][sportInfo->remindIndex]);\r
-            } else {\r
-                promptStr = "第" + std::to_string(sportInfo->remindTimes) + "个" +\r
-                            std::to_string(sportInfo->remindValue) + "公里已完成!";\r
-                promptLabel_->SetText(promptStr.c_str());\r
-                LOADIMG::LoadImageViewImg(promptIcon_, SPORT_IMAGE,\r
-                                          PROPMT_IMAGES[PROMPT_DISTANCE_INDEX][sportInfo->remindIndex]);\r
-            }\r
-        } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_TIME) {\r
-            promptStr = "第" + std::to_string(sportInfo->remindTimes) + "个" + std::to_string(sportInfo->remindValue) +\r
-                        "分钟已完成!";\r
-            promptLabel_->SetText(promptStr.c_str());\r
-            LOADIMG::LoadImageViewImg(promptIcon_, SPORT_IMAGE,\r
-                                      PROPMT_IMAGES[PROMPT_TIME_INDEX][sportInfo->remindIndex]);\r
-        }\r
-    } else if (sportInfo->promptType == SPORT_SET_TYPE_HEARTRATE) {\r
-        std::string promptStr = "当前心率" + std::to_string(sportInfo->data.heartRate) + "次/分!";\r
-        promptLabel_->SetText(promptStr.c_str());\r
-        promptIcon_->SetPosition(IMAGE_HEART_X, IMAGE_HEART_Y);\r
-        LOADIMG::LoadImageViewImg(promptIcon_, SPORT_IMAGE, IMAGE_SPORT_HEART3);\r
-    }\r
-}\r
-\r
-void SportTargetPromptPage::OnStart(void *data)\r
-{\r
-    startTime_ = time(nullptr);\r
-    group_ = new UIViewGroup();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPromptPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-\r
-    CreatePromptView();\r
-    AddViewToPageContainer(group_);\r
-\r
-    callback_ = new SportPromptAnimatorCallback(this);\r
-    if (callback_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPromptPage::OnStart callback_ new fail");\r
-        return;\r
-    }\r
-\r
-    animator_ = new Animator(callback_, nullptr, 0, true);\r
-    if (animator_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetPromptPage::OnStart new Animator animator_ fail");\r
-        return;\r
-    }\r
-}\r
-\r
-void SportTargetPromptPage::OnPause()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() != Animator::STOP) {\r
-            animator_->Stop();\r
-        }\r
-    }\r
-}\r
-\r
-void SportTargetPromptPage::OnResume()\r
-{\r
-    if (animator_ != nullptr) {\r
-        if (animator_->GetState() == Animator::STOP) {\r
-            animator_->Start();\r
-        }\r
-    }\r
-}\r
-\r
-bool SportTargetPromptPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_DATA,\r
-            TransitionType::TRANSITION_INVALID, false);\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportTargetPromptPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    return false;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetSettingPage.cpp b/code/sdk/application/wearable/evb/nativeapp/nativeui/sport/src/SportTargetSettingPage.cpp
deleted file mode 100644 (file)
index c3a10c3..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*\r
- * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2025-2025. All rights reserved.\r
- * Description: SportTargetSettingPage\r
- * Create: 2025-06-06\r
- */\r
-\r
-#include "UiConfig.h"\r
-#include "main/LoadImg.h"\r
-#include "ui_resource_sport.h"\r
-#include "wearable_log.h"\r
-#include "AppViewIDs.h"\r
-#include "NativeAbility.h"\r
-#include "SlicePageFactory.h"\r
-#include "sport/SportView.h"\r
-#include "sport/SportTargetSettingPage.h"\r
-\r
-namespace OHOS {\r
-static constexpr uint16_t LABELS_X = 100;\r
-static constexpr uint16_t LABELS_Y = 39;\r
-static constexpr uint16_t LABELS_W = 253;\r
-static constexpr uint16_t LABELS_H = 53;\r
-static constexpr uint16_t LABELS_FONT = 38;\r
-static constexpr uint16_t PICKER_X = 103;\r
-static constexpr uint16_t PICKER_Y = 122;\r
-static constexpr uint16_t PICKER_W = 247;\r
-static constexpr uint16_t PICKER_H = 212;\r
-static constexpr uint16_t BACKGROUND_FONT = 38;\r
-static constexpr uint16_t HIGHTLIGHT_FONT = 44;\r
-static constexpr uint16_t PICKER_ITEM_H = 65;\r
-static constexpr uint16_t BUTTON_X = 63;\r
-static constexpr uint16_t BUTTON_Y = 361;\r
-static constexpr uint16_t BUTTON_W = 328;\r
-static constexpr uint16_t BUTTON_H = 93;\r
-\r
-REGIST_SLICE_PAGE(VIEW_SPORT, SportPages::SPORT_PAGE_TARGET_SETTING, SportTargetSettingPage, false);\r
-\r
-SportTargetSettingPage::~SportTargetSettingPage()\r
-{\r
-    if (group_ != nullptr) {\r
-        group_->RemoveAll();\r
-        delete group_;\r
-        group_ = nullptr;\r
-    }\r
-    if (titleLabel_ != nullptr) {\r
-        delete titleLabel_;\r
-        titleLabel_ = nullptr;\r
-    }\r
-    if (picker_ != nullptr) {\r
-        delete picker_;\r
-        picker_ = nullptr;\r
-    }\r
-    if (confirmButton_ != nullptr) {\r
-        delete confirmButton_;\r
-        confirmButton_ = nullptr;\r
-    }\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SportTargetSettingPage::~SportTargetSettingPage");\r
-}\r
-\r
-void SportTargetSettingPage::CreateUILabel()\r
-{\r
-    titleLabel_ = new UILabel();\r
-    if (titleLabel_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetSettingPage titleLabel_ new fail");\r
-        return;\r
-    }\r
-    titleLabel_->SetPosition(LABELS_X, LABELS_Y, LABELS_W, LABELS_H);\r
-    titleLabel_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
-    titleLabel_->SetFont(BOLD_VECTOR_FONT_FILENAME, LABELS_FONT);\r
-    group_->Add(titleLabel_);\r
-}\r
-\r
-void SportTargetSettingPage::CreateUIPicker()\r
-{\r
-    picker_ = new UIPicker();\r
-    if (picker_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetSettingPage picker_ new fail");\r
-        return;\r
-    }\r
-    picker_->SetPosition(PICKER_X, PICKER_Y, PICKER_W, PICKER_H);\r
-    picker_->SetItemHeight(PICKER_ITEM_H);\r
-    picker_->SetBackgroundFont(DEFAULT_VECTOR_FONT_FILENAME, BACKGROUND_FONT);\r
-    picker_->SetHighlightFont(DEFAULT_VECTOR_FONT_FILENAME, HIGHTLIGHT_FONT);\r
-    group_->Add(picker_);\r
-}\r
-\r
-void SportTargetSettingPage::CreateUIButton()\r
-{\r
-    confirmButton_ = new UILabelButton();\r
-    if (confirmButton_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetSettingPage confirmButton_ new fail");\r
-        return;\r
-    }\r
-    confirmButton_->SetPosition(BUTTON_X, BUTTON_Y, BUTTON_W, BUTTON_H);\r
-    confirmButton_->SetViewId(TARGET_SETTING_CONFIRM_BUTTON);\r
-    confirmButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::RELEASED);\r
-    confirmButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::PRESSED);\r
-    confirmButton_->SetStyleForState(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT, UIButton::INACTIVE);\r
-\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (sportInfo->setType == SPORT_SET_TYPE_TARGET) {\r
-        if (sportInfo->targetType == SPORT_TARGET_DISTANCE) {\r
-            LOADIMG::LoadBtnImage(confirmButton_, SPORT_IMAGE, IMAGE_SPORT_OK1, IMAGE_SPORT_OK1);\r
-        } else if (sportInfo->targetType == SPORT_TARGET_TIME) {\r
-            LOADIMG::LoadBtnImage(confirmButton_, SPORT_IMAGE, IMAGE_SPORT_OK3, IMAGE_SPORT_OK3);\r
-        } else if (sportInfo->targetType == SPORT_TARGET_CALORIE) {\r
-            LOADIMG::LoadBtnImage(confirmButton_, SPORT_IMAGE, IMAGE_SPORT_OK2, IMAGE_SPORT_OK2);\r
-        }\r
-    } else if (sportInfo->setType == SPORT_SET_TYPE_REMIND) {\r
-        if (sportInfo->remindType == SPORT_REMIND_INTERVAL_DISTANCE) {\r
-            LOADIMG::LoadBtnImage(confirmButton_, SPORT_IMAGE, IMAGE_SPORT_OK1, IMAGE_SPORT_OK1);\r
-        } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_TIME) {\r
-            LOADIMG::LoadBtnImage(confirmButton_, SPORT_IMAGE, IMAGE_SPORT_OK3, IMAGE_SPORT_OK3);\r
-        }\r
-    }\r
-\r
-    confirmButton_->SetOnClickListener(this);\r
-    group_->Add(confirmButton_);\r
-}\r
-\r
-void SportTargetSettingPage::OnStart(void *data)\r
-{\r
-    group_ = new UIViewGroup();\r
-    if (group_ == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SportTargetSettingPage group_ new fail");\r
-        return;\r
-    }\r
-    group_->SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION);\r
-    group_->SetOnDragListener(this);\r
-    group_->SetDraggable(true);\r
-    group_->SetTouchable(true);\r
-\r
-    CreateUILabel();\r
-    CreateUIPicker();\r
-    CreateUIButton();\r
-    AddViewToPageContainer(group_);\r
-\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (sportInfo->setType == SPORT_SET_TYPE_TARGET) {\r
-        UpdateViewByTargetType();\r
-    } else if (sportInfo->setType == SPORT_SET_TYPE_REMIND) {\r
-        UpdateViewByRemindType();\r
-    }\r
-}\r
-\r
-bool SportTargetSettingPage::OnDrag(UIView &view, const DragEvent &event)\r
-{\r
-    if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) &&\r
-        (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) {\r
-        sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-        if (sportInfo->setType == SPORT_SET_TYPE_TARGET) {\r
-            sportInfo->targetType = sportInfo->targetTypeTemp;\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET,\r
-                TransitionType::TRANSITION_INVALID, false);\r
-        } else if (sportInfo->setType == SPORT_SET_TYPE_REMIND) {\r
-            sportInfo->remindType = sportInfo->remindTypeTemp;\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND,\r
-                TransitionType::TRANSITION_INVALID, false);\r
-        }\r
-    }\r
-    return true;\r
-}\r
-\r
-bool SportTargetSettingPage::OnClick(UIView &view, const ClickEvent &event)\r
-{\r
-    if (strcmp(view.GetViewId(), TARGET_SETTING_CONFIRM_BUTTON) == 0) {\r
-        uint16_t index = picker_->GetSelected();\r
-        sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-        if (sportInfo->setType == SPORT_SET_TYPE_TARGET) {\r
-            SportModel::GetInstance().SetTargetValue(index);\r
-            sportInfo->isTargetSetted = true;\r
-            SportModel::GetInstance().SaveConfig(SPORT_CONFIG_INFO);\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_TARGET,\r
-                TransitionType::TRANSITION_INVALID, false);\r
-        } else if (sportInfo->setType == SPORT_SET_TYPE_REMIND) {\r
-            SportModel::GetInstance().SetRemindValue(index);\r
-            sportInfo->isRemindSetted = true;\r
-            SportModel::GetInstance().SaveConfig(SPORT_CONFIG_INFO);\r
-            NativeAbility::GetInstance().SwitchPageInSlice(SportPages::SPORT_PAGE_REMIND,\r
-                TransitionType::TRANSITION_INVALID, false);\r
-        }\r
-    }\r
-    return true;\r
-}\r
-\r
-void SportTargetSettingPage::UpdateViewByTargetType()\r
-{\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (sportInfo->targetType == SPORT_TARGET_DISTANCE) {\r
-        SportType sportType = SportModel::GetInstance().GetSportType();\r
-        if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-            titleLabel_->SetText("趟数");\r
-            const char *uiLapData[] = {"1趟", "2趟", "4趟", "6趟", "8趟", "10趟", "12趟", "16趟", "20趟", "30趟"};\r
-            picker_->SetTextColor(Color::Gray(), Color::GetColorFromRGB(0x52, 0xe4, 0xeb));\r
-            picker_->SetValues(uiLapData, sizeof(uiLapData) / sizeof(uiLapData[0]));\r
-        } else {\r
-            titleLabel_->SetText("距离");\r
-            const char *uiDistanceData[] = {"1km", "3km", "5km", "7km", "10km", "15km", "20km", "25km", "30km", "40km"};\r
-            picker_->SetTextColor(Color::Gray(), Color::GetColorFromRGB(0x52, 0xe4, 0xeb));\r
-            picker_->SetValues(uiDistanceData, sizeof(uiDistanceData) / sizeof(uiDistanceData[0]));\r
-        }\r
-    } else if (sportInfo->targetType == SPORT_TARGET_TIME) {\r
-        titleLabel_->SetText("时间");\r
-        const char *uiTimeData[] = {"10分钟", "20分钟", "30分钟", "60分钟", "120分钟", "180分钟", "200分钟"};\r
-        picker_->SetTextColor(Color::Gray(), Color::GetColorFromRGB(0xff, 0x75, 0x00));\r
-        picker_->SetValues(uiTimeData, sizeof(uiTimeData) / sizeof(uiTimeData[0]));\r
-    } else if (sportInfo->targetType == SPORT_TARGET_CALORIE) {\r
-        titleLabel_->SetText("热量");\r
-        const char *uiCalorieData[] = {"100千卡", "200千卡", "300千卡", "500千卡", "600千卡", "800千卡", "1000千卡"};\r
-        picker_->SetTextColor(Color::Gray(), Color::GetColorFromRGB(0xff, 0x4d, 0x4f));\r
-        picker_->SetValues(uiCalorieData, sizeof(uiCalorieData) / sizeof(uiCalorieData[0]));\r
-    }\r
-    titleLabel_->Invalidate();\r
-    picker_->Invalidate();\r
-    confirmButton_->Invalidate();\r
-}\r
-\r
-void SportTargetSettingPage::UpdateViewByRemindType()\r
-{\r
-    sport_info_t *sportInfo = SportModel::GetInstance().GetCurrSportInfo();\r
-    if (sportInfo->remindType == SPORT_REMIND_INTERVAL_DISTANCE) {\r
-        SportType sportType = SportModel::GetInstance().GetSportType();\r
-        if (sportType == SPORT_TYPE_INDOOR_SWIMMING) {\r
-            titleLabel_->SetText("趟数");\r
-            const char *uiLapData[] = {"1趟", "2趟", "4趟", "6趟", "8趟", "10趟", "12趟", "16趟", "20趟", "30趟"};\r
-            picker_->SetTextColor(Color::Gray(), Color::GetColorFromRGB(0x52, 0xe4, 0xeb));\r
-            picker_->SetValues(uiLapData, sizeof(uiLapData) / sizeof(uiLapData[0]));\r
-        } else {\r
-            titleLabel_->SetText("距离");\r
-            const char *uiDistanceData[] = {"1km", "3km", "5km", "7km", "10km", "15km", "20km", "25km", "30km", "40km"};\r
-            picker_->SetTextColor(Color::Gray(), Color::GetColorFromRGB(0x52, 0xe4, 0xeb));\r
-            picker_->SetValues(uiDistanceData, sizeof(uiDistanceData) / sizeof(uiDistanceData[0]));\r
-        }\r
-    } else if (sportInfo->remindType == SPORT_REMIND_INTERVAL_TIME) {\r
-        titleLabel_->SetText("时间");\r
-        const char *uiTimeData[] = {"10分钟", "20分钟", "30分钟", "60分钟", "120分钟", "180分钟", "200分钟"};\r
-        picker_->SetTextColor(Color::Gray(), Color::GetColorFromRGB(0xff, 0x75, 0x00));\r
-        picker_->SetValues(uiTimeData, sizeof(uiTimeData) / sizeof(uiTimeData[0]));\r
-    }\r
-    titleLabel_->Invalidate();\r
-    picker_->Invalidate();\r
-    confirmButton_->Invalidate();\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd230/libmsg_center.a b/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd230/libmsg_center.a
deleted file mode 100644 (file)
index b1e105a..0000000
Binary files a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd230/libmsg_center.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd230_user/libmsg_center.a b/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd230_user/libmsg_center.a
deleted file mode 100644 (file)
index b1e105a..0000000
Binary files a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd230_user/libmsg_center.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd272/libmsg_center.a b/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd272/libmsg_center.a
deleted file mode 100644 (file)
index b1e105a..0000000
Binary files a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-fd272/libmsg_center.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-ln/libmsg_center.a b/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-ln/libmsg_center.a
deleted file mode 100644 (file)
index b1e105a..0000000
Binary files a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-ln/libmsg_center.a and /dev/null differ
diff --git a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-lnppp/libmsg_center.a b/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-lnppp/libmsg_center.a
deleted file mode 100644 (file)
index b1e105a..0000000
Binary files a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-lnppp/libmsg_center.a and /dev/null differ
index b1e105a..7e69f1c 100644 (file)
Binary files a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-n9/libmsg_center.a and b/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-n9/libmsg_center.a differ
diff --git a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-n9ln/libmsg_center.a b/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-n9ln/libmsg_center.a
deleted file mode 100644 (file)
index b1e105a..0000000
Binary files a/code/sdk/application/wearable/evb/service/msg_center/brandy-native-js-n9ln/libmsg_center.a and /dev/null differ
index 775fa63..68ab45d 100644 (file)
@@ -22,6 +22,7 @@ const uint32_t PAGE_OFFSET = 16;
 
 void AbilitySlice::OnStart(void* data)
 {
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnStart");
     if ((presenter_ == nullptr) || (view_ == nullptr)) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Presenter or View  was nullptr for slice %s", sliceId_);
         return;
@@ -42,11 +43,12 @@ void AbilitySlice::OnStart(void* data)
     presenter_->OnStart();
     presenter_->OnStart(data);
     state_ = SliceState::START;
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnStart state_ = %d", state_);
 }
 
 void AbilitySlice::OnResume()
 {
-
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnResume state_ = %d", state_);
     if(NativeAbility::GetInstance().GetCurSliceId() == VIEW_MAIN || NativeAbility::GetInstance().GetCurSliceId() == VIEW_APPLIST)
     {
         if (!ImageCacheManager::GetInstance().IsInAod()) {
@@ -61,6 +63,7 @@ void AbilitySlice::OnResume()
         return;
     }
 
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnResume:%d",__LINE__);
     if (view_->GetRootContainer()->GetParent() == nullptr) {
         RootView::GetInstance()->Add(view_->GetRootContainer());
     }
@@ -81,10 +84,15 @@ void AbilitySlice::OnResume()
         view_->GetRootContainer()->SetOnDragListener(backDragListener);
     }
 
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnResume:%d",__LINE__);
     slicePageMgr_.ResumeSlicePage();
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnResume:%d",__LINE__);
     presenter_->OnResume();
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnResume:%d",__LINE__);
     view_->Draw();
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnResume:%d",__LINE__);
     state_ = SliceState::RESUME;
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "AbilitySlice::OnResume state_ = %d", state_);
 }
 
 void AbilitySlice::OnPause()
diff --git a/code/sdk/application/wearable/n9/nativeapp/brandy-native-js-fd230/libuikit_fwk.a b/code/sdk/application/wearable/n9/nativeapp/brandy-native-js-fd230/libuikit_fwk.a
deleted file mode 100644 (file)
index e3ce469..0000000
Binary files a/code/sdk/application/wearable/n9/nativeapp/brandy-native-js-fd230/libuikit_fwk.a and /dev/null differ
index e3ce469..dd5873d 100644 (file)
Binary files a/code/sdk/application/wearable/n9/nativeapp/brandy-native-js-n9/libuikit_fwk.a and b/code/sdk/application/wearable/n9/nativeapp/brandy-native-js-n9/libuikit_fwk.a differ
index 5116681..6744e7e 100644 (file)
@@ -61,7 +61,7 @@
 #endif
 
 namespace OHOS {
-
+int16_t BackDragListener::maxDragRegionX_ = MAX_X_IN_DRAG_REGION;
 NativeLauncher::NativeLauncher() {}
 NativeLauncher::~NativeLauncher() {}
 
index cb2ff09..7a6f4bd 100644 (file)
@@ -48,7 +48,7 @@ namespace OHOS
 
     void LanguageSwitchPresenter::OnStart()
     {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "LanguageSwitchPresenter::OnStart");
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchPresenter::OnStart");
         if (view_ == nullptr)
         {
             return;
@@ -58,6 +58,11 @@ namespace OHOS
             printf("LanguageSwitchPresenter::OnStart: %d\n", i);
             view_->AddLanguageItemToList(languages[i]);
         }
+        if (view_ == nullptr)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LanguageSwitchPresenter::OnStart view_ is nullptr");
+            return;
+        }
         view_->RefreshLanguageList();
     }
 
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootDeviceView.h b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootDeviceView.h
deleted file mode 100644 (file)
index 3e50f0b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*\r
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: RebootDevice View\r
- * Create: 2022-04-28\r
- */\r
-#ifndef REBOOTDEVICE_VIEW_H\r
-#define REBOOTDEVICE_VIEW_H\r
-\r
-#include "View.h"\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_label.h"\r
-#include "components/ui_button.h"\r
-\r
-namespace OHOS {\r
-class RebootDeviceView {\r
-public:\r
-    RebootDeviceView();\r
-    ~RebootDeviceView();\r
-    static RebootDeviceView *GetInstance();\r
-    UIViewGroup *InitShowUpView(void);\r
-\r
-private:\r
-    bool ShowUpRebootDeviceView(void);\r
-    UILabel *rebootDeviceLabel{nullptr};\r
-    UIButton *rebootDeviceButton{nullptr};\r
-    UIViewGroup *group{nullptr};\r
-};\r
-} // namespace OHOS\r
-#endif // REBOOTDEVICE_VIEW_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootModel.h b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootModel.h
deleted file mode 100644 (file)
index fba69e6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*\r
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: Reboot Model\r
- * Create: 2022-04-28\r
- */\r
-\r
-#ifndef REBOOT_MODEL_H\r
-#define REBOOT_MODEL_H\r
-#include <stdint.h>\r
-\r
-namespace OHOS {\r
-enum RebootModelView : uint8_t {\r
-    REBOOT,\r
-    REBOOTDEVICE,\r
-    SHUTDOWNDEVICE,\r
-};\r
-\r
-class RebootModel {\r
-public:\r
-    ~RebootModel();\r
-    static RebootModel *GetInstance(void);\r
-    int16_t GetSelectView(void);\r
-    void SetSelectViewId(int16_t value);\r
-    bool GetExitsView(void);\r
-    void SetExitsView(bool value);\r
-    void SoftRebootDevice(void);\r
-    void ShutdownDevice(void);\r
-\r
-private:\r
-    RebootModel();\r
-    int16_t selectView{0};\r
-    bool exitsView{false};\r
-};\r
-}\r
-#endif
\ No newline at end of file
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootPresenter.h b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootPresenter.h
deleted file mode 100644 (file)
index 38cf1c9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*\r
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: Reboot Presenter\r
- * Create: 2022-04-28\r
- */\r
-\r
-#ifndef REBOOT_PRESENTER_H\r
-#define REBOOT_PRESENTER_H\r
-\r
-#include "key/include/KeyInputListener.h"\r
-#include "Presenter.h"\r
-#include "NativeLauncher.h"\r
-#include "NativeAbility.h"\r
-\r
-namespace OHOS {\r
-enum RebootPresenterNum : uint8_t {\r
-        REBOOTVIEW = 0,\r
-        REBOOTDEVICEVIEW,\r
-        SHUTDOWNDEVICEVIEW,\r
-        REBOOT_MAX,\r
-};\r
-\r
-#define REBOOT_BUTTON "rebootButton"\r
-#define SHUTDOWN_BUTTON "shutdownButton"\r
-#define REBOOTDEVICE_BUTTON "rebootDeviceButton"\r
-#define SHUTDOWNDEVICE_BUTTON "shutdownDeviceButton"\r
-\r
-#define REBOOT_VIEW "rebootView"\r
-#define REBOOTDEVICE_VIEW "rebootDeviceView"\r
-#define SHUTDOWNDEVICE_VIEW "shutdownDeviceView"\r
-\r
-class RebootView;\r
-class RebootPresenter : public Presenter<RebootView>,\r
-                        public UIView::OnClickListener,\r
-                        public UIView::OnDragListener {\r
-public:\r
-    RebootPresenter();\r
-    ~RebootPresenter();\r
-    static RebootPresenter *GetInstance();\r
-    bool OnClick(UIView& view, const ClickEvent& event) override;\r
-    bool OnDrag(UIView& view, const DragEvent& event) override;\r
-\r
-private:\r
-};\r
-} // namespace OHOS\r
-#endif\r
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootView.h b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/RebootView.h
deleted file mode 100644 (file)
index 2019136..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*\r
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: Reboot View\r
- * Create: 2022-04-28\r
- */\r
-#ifndef REBOOT_VIEW_H\r
-#define REBOOT_VIEW_H\r
-\r
-#include "View.h"\r
-#include "rebootdevice/include/ShutdownDeviceView.h"\r
-#include "rebootdevice/include/RebootDeviceView.h"\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_label.h"\r
-#include "components/ui_button.h"\r
-\r
-namespace OHOS {\r
-constexpr int16_t NUM_REBOOT_CONTAINER = 3;\r
-\r
-class RebootPresenter;\r
-class RebootView : public View<RebootPresenter> {\r
-public:\r
-    RebootView();\r
-    ~RebootView() override;\r
-    static RebootView *GetInstance();\r
-    void OnStart() override;\r
-    UIViewGroup *InitShowUpView(void);\r
-    void ChangeView(int16_t hideView, int16_t showView);\r
-\r
-private:\r
-    bool ChangeRebootView(int16_t hideView, int16_t thisView);\r
-    bool ChangeRebootDeviceView(int16_t hideView, int16_t thisView);\r
-    bool ChangeShutdownDeviceView(int16_t hideView, int16_t thisView);\r
-    bool CheckViewParam(int16_t hideView, int16_t showView);\r
-    bool ShowUpRebootView(void);\r
-    bool ShowUpShutdownView(void);\r
-    UILabel *rebootLabel{nullptr};\r
-    UIButton *rebootButton{nullptr};\r
-    UILabel *shutdownLabel{nullptr};\r
-    UIButton *shutdownButton{nullptr};\r
-    UIViewGroup *group{nullptr};\r
-    RebootDeviceView *rebootDeviceView{nullptr};\r
-    ShutdownDeviceView *shutdownDeviceView{nullptr};\r
-    UIViewGroup *container[NUM_REBOOT_CONTAINER]{nullptr};\r
-    typedef bool (RebootView::*PreprosssChangeView)(int16_t hideView, int16_t thisView);\r
-    PreprosssChangeView preProcessView[NUM_REBOOT_CONTAINER];\r
-};\r
-} // namespace OHOS\r
-#endif // REBOOT_VIEW_H\r
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/ShutdownDeviceView.h b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/include/ShutdownDeviceView.h
deleted file mode 100644 (file)
index 33140b5..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*\r
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: ShutdownDevice View\r
- * Create: 2022-04-28\r
- */\r
-#ifndef SHUTDOWNDEVICE_VIEW_H\r
-#define SHUTDOWNDEVICE_VIEW_H\r
-\r
-#include "View.h"\r
-#include "components/ui_view_group.h"\r
-#include "components/ui_label.h"\r
-#include "components/ui_button.h"\r
-\r
-namespace OHOS {\r
-class ShutdownDeviceView {\r
-public:\r
-    ShutdownDeviceView();\r
-    ~ShutdownDeviceView();\r
-    static ShutdownDeviceView *GetInstance();\r
-    UIViewGroup *InitShowUpView(void);\r
-\r
-private:\r
-    bool ShowUpShutdownDeviceView(void);\r
-    UILabel *shutdownDeviceLabel{nullptr};\r
-    UIButton *shutdownDeviceButton{nullptr};\r
-    UIViewGroup *group{nullptr};\r
-};\r
-} // namespace OHOS\r
-#endif // SHUTDOWNDEVICE_VIEW_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootDeviceView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootDeviceView.cpp
deleted file mode 100644 (file)
index 9575f2b..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*\r
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: RebootDevice View\r
- * Create: 2022-04-28\r
- */\r
-\r
-#include "rebootdevice/include/RebootDeviceView.h"\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "rebootdevice/include/RebootPresenter.h"\r
-#include "PageTransitionMgr.h"\r
-\r
-namespace OHOS {\r
-static RebootDeviceView *g_pRebootDeviceView{nullptr};\r
-RebootDeviceView::RebootDeviceView()\r
-{\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootDeviceView::RebootDeviceView");\r
-    g_pRebootDeviceView = this;\r
-}\r
-\r
-RebootDeviceView::~RebootDeviceView()\r
-{\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootDeviceView::~RebootDeviceView");\r
-    if (group != nullptr) {\r
-        group->RemoveAll();\r
-    }\r
-    delete rebootDeviceLabel;\r
-    rebootDeviceLabel = nullptr;\r
-    delete rebootDeviceButton;\r
-    rebootDeviceButton = nullptr;\r
-    delete group;\r
-    group = nullptr;\r
-    g_pRebootDeviceView = nullptr;\r
-}\r
-\r
-RebootDeviceView *RebootDeviceView::GetInstance()\r
-{\r
-    return g_pRebootDeviceView;\r
-}\r
-\r
-bool RebootDeviceView::ShowUpRebootDeviceView()\r
-{\r
-    if (rebootDeviceLabel == nullptr) {\r
-        rebootDeviceLabel = new UILabel();\r
-        if (rebootDeviceLabel == nullptr) {\r
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpRebootDeviceView rebootDeviceLabel new fail");\r
-            return false;\r
-        }\r
-    }\r
-    rebootDeviceLabel->SetPosition(152, 272, 150, 45); // 152:x 272:y 150:width 45:height\r
-    rebootDeviceLabel->SetText("重启");\r
-    rebootDeviceLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35:font data\r
-    rebootDeviceLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE);\r
-    rebootDeviceLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER,\r
-                                UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);\r
-\r
-    if (rebootDeviceButton == nullptr) {\r
-        rebootDeviceButton = new UIButton();\r
-        if (rebootDeviceButton == nullptr) {\r
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpRebootDeviceView rebootDeviceButton new fail");\r
-            return false;\r
-        }\r
-    }\r
-    rebootDeviceButton->SetPosition(172, 147, 110, 110); // 172:x 147:y 110:width 110:height\r
-    rebootDeviceButton->SetImageSrc(PNG_REBOOT_BUTTON_IMAGE, PNG_REBOOT_BUTTON_IMAGE);\r
-    rebootDeviceButton->SetViewId(REBOOTDEVICE_BUTTON);\r
-    UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::RebootPresenter::GetInstance();\r
-    if (clickListener == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "clickListener GetInstance nullptr");\r
-        return false;\r
-    }\r
-    rebootDeviceButton->SetOnClickListener(clickListener);\r
-    return true;\r
-}\r
-\r
-UIViewGroup *RebootDeviceView::InitShowUpView(void)\r
-{\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootDeviceView::InitShowUpView");\r
-    bool ret;\r
-    if (group == nullptr) {\r
-        group = new UIViewGroup();\r
-        if (group == nullptr) {\r
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group new fail");\r
-            return nullptr;\r
-        }\r
-        group->SetPosition(0, 0); // 0:x; 0:y\r
-        group->SetWidth(HORIZONTAL_RESOLUTION);\r
-        group->SetHeight(VERTICAL_RESOLUTION);\r
-    }\r
-    ret = ShowUpRebootDeviceView();\r
-    if (!ret) {\r
-        return nullptr;\r
-    }\r
-    group->Add(rebootDeviceLabel);\r
-    group->Add(rebootDeviceButton);\r
-\r
-    UIView::OnDragListener *rebootDeviceDragListener = (UIView::OnDragListener *)OHOS::RebootPresenter::GetInstance();\r
-    if (rebootDeviceDragListener == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDeviceDragListener GetInstance fail");\r
-        return nullptr;\r
-    }\r
-    if (PageTransitionMgr::GetInstance().GetTopSlideBackImage() == nullptr) { // support default slide back firstly\r
-        group->SetOnDragListener(rebootDeviceDragListener);\r
-    }\r
-    group->SetViewId(REBOOTDEVICE_VIEW);\r
-    group->SetDraggable(true);\r
-    group->SetTouchable(true);\r
-    return group;\r
-}\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootModel.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootModel.cpp
deleted file mode 100644 (file)
index e5d19bc..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*\r
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: Reboot Model\r
- * Create: 2022-04-28\r
- */\r
-\r
-#include "rebootdevice/include/RebootModel.h"\r
-#include "dfx_reboot.h"\r
-\r
-namespace OHOS {\r
-RebootModel::RebootModel() {}\r
-\r
-RebootModel::~RebootModel() {}\r
-\r
-RebootModel *RebootModel::GetInstance(void)\r
-{\r
-    static RebootModel instance;\r
-    return &instance;\r
-}\r
-\r
-int16_t RebootModel::GetSelectView(void)\r
-{\r
-    return selectView;\r
-}\r
-\r
-void RebootModel::SetSelectViewId(int16_t value)\r
-{\r
-    selectView = value;\r
-}\r
-\r
-bool RebootModel::GetExitsView(void)\r
-{\r
-    return exitsView;\r
-}\r
-\r
-void RebootModel::SetExitsView(bool value)\r
-{\r
-    exitsView = value;\r
-}\r
-\r
-void RebootModel::SoftRebootDevice(void)\r
-{\r
-    uapi_system_reboot(SYSTEM_SOFT_REBOOT);\r
-}\r
-\r
-void RebootModel::ShutdownDevice(void)\r
-{\r
-    uapi_system_shutdown(0);\r
-}\r
-\r
-}
\ No newline at end of file
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootPresenter.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootPresenter.cpp
deleted file mode 100644 (file)
index db26c7b..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.
- * Description: Reboot Presenter
- * Create: 2022-04-28
- */
-
-#include "rebootdevice/include/RebootPresenter.h"
-#include "rebootdevice/include/RebootView.h"
-#include "rebootdevice/include/RebootModel.h"
-#include "drag_event.h"
-#include "wearable_log.h"
-#include "NativeRegisterManager.h"
-
-namespace OHOS {
-
-REGIST_SLICE(VIEW_REBOOT, RebootView, RebootPresenter);
-
-static RebootPresenter *g_pRebootPresenter = nullptr;
-
-RebootPresenter::RebootPresenter()
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::RebootPresenter");
-    g_pRebootPresenter = this;
-}
-
-RebootPresenter::~RebootPresenter()
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::~RebootPresenter");
-    g_pRebootPresenter = nullptr;
-}
-
-RebootPresenter *RebootPresenter::GetInstance()
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter GetInstance");
-    return g_pRebootPresenter;
-}
-
-bool RebootPresenter::OnClick(UIView& view, const ClickEvent& event)
-{
-    UNUSED(event);
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnClick OnClick");
-    if (strcmp(view.GetViewId(), REBOOT_BUTTON) == 0) {
-        RebootView::GetInstance()->ChangeView(REBOOTVIEW, REBOOTDEVICEVIEW);
-    } else if (strcmp(view.GetViewId(), SHUTDOWN_BUTTON) == 0) {
-        RebootView::GetInstance()->ChangeView(REBOOTVIEW, SHUTDOWNDEVICEVIEW);
-    } else if (strcmp(view.GetViewId(), REBOOTDEVICE_BUTTON) == 0) {
-        // 重启
-       
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "REBOOTDEVICE_BUTTON OnClick");
-        RebootModel::GetInstance()->SoftRebootDevice();
-    } else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_BUTTON) == 0) {
-        // 关机
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SHUTDOWNDEVICE_BUTTON OnClick");
-        RebootModel::GetInstance()->ShutdownDevice();
-    }
-    return true;
-}
-
-bool RebootPresenter::OnDrag(UIView& view, const DragEvent& event)
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootPresenter::OnDrag");
-    if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) {
-        if (strcmp(view.GetViewId(), REBOOT_VIEW) == 0) {
-            NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN);
-        } else if (strcmp(view.GetViewId(), REBOOTDEVICE_VIEW) == 0) {
-            if (RebootModel::GetInstance()->GetExitsView() == 0) {
-                RebootView::GetInstance()->ChangeView(REBOOTDEVICEVIEW, REBOOTVIEW);
-            } else {
-                NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING);
-                RebootModel::GetInstance()->SetExitsView(false);
-            }
-        } else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_VIEW) == 0) {
-            if (RebootModel::GetInstance()->GetExitsView() == 0) {
-                RebootView::GetInstance()->ChangeView(SHUTDOWNDEVICEVIEW, REBOOTVIEW);
-            } else {
-                NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING);
-                RebootModel::GetInstance()->SetExitsView(false);
-            }
-        }
-    }
-    return true;
-}
-}
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/RebootView.cpp
deleted file mode 100644 (file)
index 92fc106..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.
- * Description: Reboot View
- * Create: 2022-04-28
- */
-
-#include "rebootdevice/include/RebootView.h"
-#include "rebootdevice/include/RebootModel.h"
-#include "wearable_log.h"
-#include "UiConfig.h"
-#include "rebootdevice/include/RebootPresenter.h"
-#include "PageTransitionMgr.h"
-
-namespace OHOS {
-static RebootView *g_pRebootView{nullptr};
-RebootView::RebootView()
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::RebootView");
-    preProcessView[REBOOTVIEW] = &RebootView::ChangeRebootView;
-    preProcessView[REBOOTDEVICEVIEW] = &RebootView::ChangeRebootDeviceView;
-    preProcessView[SHUTDOWNDEVICEVIEW] = &RebootView::ChangeShutdownDeviceView;
-    g_pRebootView = this;
-}
-
-RebootView::~RebootView()
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~RebootView");
-    if (group != nullptr) {
-        group->RemoveAll();
-    }
-    delete rebootLabel;
-    rebootLabel = nullptr;
-    delete rebootButton;
-    rebootButton = nullptr;
-    delete shutdownLabel;
-    shutdownLabel = nullptr;
-    delete shutdownButton;
-    shutdownButton = nullptr;
-    delete group;
-    group = nullptr;
-    g_pRebootView = nullptr;
-}
-
-RebootView *RebootView::GetInstance()
-{
-    return g_pRebootView;
-}
-
-void RebootView::OnStart()
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::~OnStart");
-    if (RebootModel::GetInstance()->GetSelectView() == REBOOT) {
-        ChangeView(REBOOT_MAX, REBOOTVIEW);
-    } else if (RebootModel::GetInstance()->GetSelectView() == REBOOTDEVICE) {
-        ChangeView(REBOOT_MAX, REBOOTDEVICEVIEW);
-        RebootModel::GetInstance()->SetSelectViewId(REBOOT);
-    } else if (RebootModel::GetInstance()->GetSelectView() == SHUTDOWNDEVICE) {
-        ChangeView(REBOOT_MAX, SHUTDOWNDEVICEVIEW);
-        RebootModel::GetInstance()->SetSelectViewId(REBOOT);
-    }
-    return;
-}
-
-bool RebootView::ShowUpRebootView()
-{
-    if (rebootLabel == nullptr) {
-        rebootLabel = new UILabel();
-        if (rebootLabel == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpRebootView rebootLabel new fail");
-            return false;
-        }
-    }
-    rebootLabel->SetPosition(49, 272, 150, 45); // 49:x 272:y 150:width 45:height
-    rebootLabel->SetText("重启");
-    rebootLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35:font data
-    rebootLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE);
-    rebootLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER,
-                          UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);
-
-    if (rebootButton == nullptr) {
-        rebootButton = new UIButton();
-        if (rebootButton == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpRebootView rebootButton new fail");
-            return false;
-        }
-    }
-    rebootButton->SetPosition(69, 147, 110, 110); // 69:x 147:y 110:width 110:height
-    rebootButton->SetImageSrc(PNG_REBOOT_BUTTON_IMAGE, PNG_REBOOT_BUTTON_IMAGE);
-    rebootButton->SetViewId(REBOOT_BUTTON);
-    UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::RebootPresenter::GetInstance();
-    if (clickListener == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "clickListener GetInstance nullptr");
-        return false;
-    }
-    rebootButton->SetOnClickListener(clickListener);
-    return true;
-}
-
-bool RebootView::ShowUpShutdownView()
-{
-    if (shutdownLabel == nullptr) {
-        shutdownLabel = new UILabel();
-        if (shutdownLabel == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpShutdownView shutdownLabel new fail");
-            return false;
-        }
-    }
-    shutdownLabel->SetPosition(255, 272, 150, 45); // 255:x 272:y 150:width 45:height
-    shutdownLabel->SetText("关机");
-    shutdownLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35:font data
-    shutdownLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE);
-    shutdownLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER,
-                            UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);
-
-    if (shutdownButton == nullptr) {
-        shutdownButton = new UIButton();
-        if (shutdownButton == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpShutdownView shutdownButton new fail");
-            return false;
-        }
-    }
-    shutdownButton->SetPosition(275, 147, 110, 110); // 275:x 147:y 110:width 110:height
-    shutdownButton->SetImageSrc(PNG_SHUTDOWN_BUTTON_IMAGE, PNG_SHUTDOWN_BUTTON_IMAGE);
-    shutdownButton->SetViewId(SHUTDOWN_BUTTON);
-    UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::RebootPresenter::GetInstance();
-    if (clickListener == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "clickListener GetInstance nullptr");
-        return false;
-    }
-    shutdownButton->SetOnClickListener(clickListener);
-    return true;
-}
-
-UIViewGroup *RebootView::InitShowUpView(void)
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::InitShowUpView");
-    bool ret;
-    if (group == nullptr) {
-        group = new UIViewGroup();
-        if (group == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group new fail");
-            return nullptr;
-        }
-        group->SetPosition(0, 0); // 0:x; 0:y
-        group->SetWidth(HORIZONTAL_RESOLUTION);
-        group->SetHeight(VERTICAL_RESOLUTION);
-    }
-    ret = ShowUpRebootView();
-    if (!ret) {
-        return nullptr;
-    }
-    group->Add(rebootLabel);
-    group->Add(rebootButton);
-
-    ret = ShowUpShutdownView();
-    if (!ret) {
-        return nullptr;
-    }
-    group->Add(shutdownLabel);
-    group->Add(shutdownButton);
-    UIView::OnDragListener *rebootDragListener = (UIView::OnDragListener *)OHOS::RebootPresenter::GetInstance();
-    if (rebootDragListener == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDragListener GetInstance fail");
-        return nullptr;
-    }
-    if (PageTransitionMgr::GetInstance().GetTopSlideBackImage() == nullptr) { // support default slide back firstly
-        group->SetOnDragListener(rebootDragListener);
-    }
-    group->SetViewId(REBOOT_VIEW);
-    group->SetDraggable(true);
-    group->SetTouchable(true);
-    return group;
-}
-
-bool RebootView::ChangeRebootView(int16_t hideView, int16_t thisView)
-{
-    UNUSED(hideView);
-    // init view
-    UIViewGroup *viewGroup = InitShowUpView();
-    if (viewGroup == nullptr) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
-        return false;
-    }
-    container[thisView] = viewGroup;
-    AddViewToRootContainer(container[thisView]);
-    return true;
-}
-
-bool RebootView::ChangeRebootDeviceView(int16_t hideView, int16_t thisView)
-{
-    UNUSED(hideView);
-    if (container[thisView] == nullptr) {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ChangeRebootDeviceView");
-        rebootDeviceView = new RebootDeviceView();
-        if (rebootDeviceView == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDeviceView new fail");
-            return false;
-        }
-        // init view
-        UIViewGroup *viewGroup = rebootDeviceView->InitShowUpView();
-        if (viewGroup == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
-            return false;
-        }
-        container[thisView] = viewGroup;
-        AddViewToRootContainer(container[thisView]);
-    }
-    return true;
-}
-
-bool RebootView::ChangeShutdownDeviceView(int16_t hideView, int16_t thisView)
-{
-    UNUSED(hideView);
-    if (container[thisView] == nullptr) {
-        WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ChangeShutdownDeviceView");
-        shutdownDeviceView = new ShutdownDeviceView();
-        if (shutdownDeviceView == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "shutdownDeviceView new fail");
-            return false;
-        }
-        // init view
-        UIViewGroup *viewGroup = shutdownDeviceView->InitShowUpView();
-        if (viewGroup == nullptr) {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewGroup nullptr fail");
-            return false;
-        }
-        container[thisView] = viewGroup;
-        AddViewToRootContainer(container[thisView]);
-    }
-    return true;
-}
-
-bool RebootView::CheckViewParam(int16_t hideView, int16_t showView)
-{
-    if (showView < 0 || showView >= REBOOT_MAX) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam showView err.");
-        return false;
-    }
-
-    if (hideView < 0 || hideView > REBOOT_MAX) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam hideView err.");
-        return false;
-    }
-
-    return true;
-}
-
-void RebootView::ChangeView(int16_t hideView, int16_t showView)
-{
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d, %d", hideView, showView);
-
-    if (!CheckViewParam(hideView, showView)) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::CheckViewParam failed.");
-        return;
-    }
-
-    PreprosssChangeView tmpPreProcessView = preProcessView[showView];
-
-    if (!(this->*tmpPreProcessView)(hideView, showView)) {
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootView::ChangeView %d %dfailed", showView, hideView);
-        return;
-    }
-    if (hideView != REBOOT_MAX) {
-        if (container[hideView] == nullptr) {
-            return;
-        }
-        container[hideView]->SetVisible(false);
-    }
-    container[showView]->SetVisible(true);
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RebootView:: ChangeView end!!!%d", showView);
-    Draw();
-}
-}
diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/ShutdownDeviceView.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/rebootdevice/src/ShutdownDeviceView.cpp
deleted file mode 100644 (file)
index 4f37f2f..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*\r
- * Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: ShutdownDevice View\r
- * Create: 2022-04-28\r
- */\r
-\r
-#include "rebootdevice/include/ShutdownDeviceView.h"\r
-#include "wearable_log.h"\r
-#include "UiConfig.h"\r
-#include "rebootdevice/include/RebootPresenter.h"\r
-#include "PageTransitionMgr.h"\r
-\r
-namespace OHOS {\r
-static ShutdownDeviceView *g_pShutdownDeviceView{nullptr};\r
-ShutdownDeviceView::ShutdownDeviceView()\r
-{\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ShutdownDeviceView::ShutdownDeviceView");\r
-    g_pShutdownDeviceView = this;\r
-}\r
-\r
-ShutdownDeviceView::~ShutdownDeviceView()\r
-{\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ShutdownDeviceView::~ShutdownDeviceView");\r
-    if (group != nullptr) {\r
-        group->RemoveAll();\r
-    }\r
-    delete shutdownDeviceLabel;\r
-    shutdownDeviceLabel = nullptr;\r
-    delete shutdownDeviceButton;\r
-    shutdownDeviceButton = nullptr;\r
-    delete group;\r
-    group = nullptr;\r
-    g_pShutdownDeviceView = nullptr;\r
-}\r
-\r
-ShutdownDeviceView *ShutdownDeviceView::GetInstance()\r
-{\r
-    return g_pShutdownDeviceView;\r
-}\r
-\r
-bool ShutdownDeviceView::ShowUpShutdownDeviceView()\r
-{\r
-    if (shutdownDeviceLabel == nullptr) {\r
-        shutdownDeviceLabel = new UILabel();\r
-        if (shutdownDeviceLabel == nullptr) {\r
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpShutdownDeviceView shutdownDeviceLabel new fail");\r
-            return false;\r
-        }\r
-    }\r
-    shutdownDeviceLabel->SetPosition(152, 272, 150, 45); // 152:x 272:y 150:width 45:height\r
-    shutdownDeviceLabel->SetText("关机");\r
-    shutdownDeviceLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35); // 35:font data\r
-    shutdownDeviceLabel->SetStyle(STYLE_BACKGROUND_COLOR, OPA_OPAQUE);\r
-    shutdownDeviceLabel->SetAlign(UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER,\r
-                                  UITextLanguageAlignment::TEXT_ALIGNMENT_CENTER);\r
-\r
-    if (shutdownDeviceButton == nullptr) {\r
-        shutdownDeviceButton = new UIButton();\r
-        if (shutdownDeviceButton == nullptr) {\r
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ShowUpShutdownDeviceView shutdownDeviceButton new fail");\r
-            return false;\r
-        }\r
-    }\r
-    shutdownDeviceButton->SetPosition(172, 147, 110, 110); // 172:x 147:y 110:width 110:height\r
-    shutdownDeviceButton->SetImageSrc(PNG_SHUTDOWN_BUTTON_IMAGE, PNG_SHUTDOWN_BUTTON_IMAGE);\r
-    shutdownDeviceButton->SetViewId(SHUTDOWNDEVICE_BUTTON);\r
-    UIView::OnClickListener *clickListener = (UIView::OnClickListener *)OHOS::RebootPresenter::GetInstance();\r
-    if (clickListener == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "clickListener GetInstance nullptr");\r
-        return false;\r
-    }\r
-    shutdownDeviceButton->SetOnClickListener(clickListener);\r
-    return true;\r
-}\r
-\r
-UIViewGroup *ShutdownDeviceView::InitShowUpView(void)\r
-{\r
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ShutdownDeviceView::InitShowUpView");\r
-    bool ret;\r
-    if (group == nullptr) {\r
-        group = new UIViewGroup();\r
-        if (group == nullptr) {\r
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "group new fail");\r
-            return nullptr;\r
-        }\r
-        group->SetPosition(0, 0); // 0:x; 0:y\r
-        group->SetWidth(HORIZONTAL_RESOLUTION);\r
-        group->SetHeight(VERTICAL_RESOLUTION);\r
-    }\r
-\r
-    ret = ShowUpShutdownDeviceView();\r
-    if (!ret) {\r
-        return nullptr;\r
-    }\r
-    group->Add(shutdownDeviceLabel);\r
-    group->Add(shutdownDeviceButton);\r
-    UIView::OnDragListener *rebootDragListener = (UIView::OnDragListener *)OHOS::RebootPresenter::GetInstance();\r
-    if (rebootDragListener == nullptr) {\r
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootDragListener GetInstance fail");\r
-        return nullptr;\r
-    }\r
-    if (PageTransitionMgr::GetInstance().GetTopSlideBackImage() == nullptr) { // support default slide back firstly\r
-        group->SetOnDragListener(rebootDragListener);\r
-    }\r
-    group->SetViewId(SHUTDOWNDEVICE_VIEW);\r
-    group->SetDraggable(true);\r
-    group->SetTouchable(true);\r
-    return group;\r
-}\r
-}
\ No newline at end of file
index 964c0d2..80449a7 100644 (file)
@@ -112,7 +112,5 @@ namespace OHOS
                     styleTable_[i].btn->SetState(false);
                 }
             }
-            // 切换到切换表盘Slice
-            // NativeAbility::GetInstance().ChangeSlice(VIEW_SET_DIAL);
         }
     } // OHOS
\ No newline at end of file
index d3a16c0..632b6b1 100644 (file)
@@ -95,7 +95,5 @@ void SetTimeFormatView::OnClick(UIView &view) {
     btnFormat24H_.SetState(false);
     SetTimeFormatModel::GetInstance().SetStyle(TimeFormat::TIME_FORMAT_12H);
   }
-  // 切换到切换表盘Slice
-  // NativeAbility::GetInstance().ChangeSlice(VIEW_SET_DIAL);
 }
 } // namespace OHOS
\ No newline at end of file
index a54510e..acc1f06 100644 (file)
@@ -67,6 +67,8 @@ uint32_t clocks_get_core_frequency(void);
  */
 void system_mcu_clocks_config(void);
 
+uint32_t clocks_get_spi_frequency(void);
+
 /**
   * @}
   */
index 4f14593..47d9161 100644 (file)
@@ -369,11 +369,7 @@ static const system_mcu_perip_clk_t g_system_mcu_perp_clk_set_config[] = {
     {HAL_CLOCKS_APP_SPI2_MS_CLK, TURN_OFF},    // spi2 clock\r
     {HAL_CLOCKS_APP_UART_H0_CLK, TURN_ON},     // uart h0 clock\r
     {HAL_CLOCKS_APP_UART_H1_CLK, TURN_ON},     // uart h1 clock\r
-#ifdef BOARD_FD272\r
-    {HAL_CLOCKS_APP_I2C0_CLK, TURN_ON},       // i2c0 clock\r
-#else\r
     {HAL_CLOCKS_APP_I2C0_CLK, TURN_OFF},       // i2c0 clock\r
-#endif\r
     {HAL_CLOCKS_APP_I2C1_CLK, TURN_ON},        // i2c1 clock\r
     {HAL_CLOCKS_APP_I2C2_CLK, TURN_ON},       // i2c2 clock\r
     {HAL_CLOCKS_APP_I2C3_CLK, TURN_ON},        // i2c3 clock\r
index 514c229..5ccbce8 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/media/evb_standard/libjs_audio_recorder.a and b/code/sdk/interim_binary/brandy/libs/media/evb_standard/libjs_audio_recorder.a differ
diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230/libdisplay_gfx.a
deleted file mode 100644 (file)
index 8864f8e..0000000
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230/libdisplay_gfx.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230_user/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230_user/libdisplay_gfx.a
deleted file mode 100644 (file)
index 8864f8e..0000000
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd230_user/libdisplay_gfx.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd272/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd272/libdisplay_gfx.a
deleted file mode 100644 (file)
index 8864f8e..0000000
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-fd272/libdisplay_gfx.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-ln/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-ln/libdisplay_gfx.a
deleted file mode 100644 (file)
index 8864f8e..0000000
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-ln/libdisplay_gfx.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-lnppp/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-lnppp/libdisplay_gfx.a
deleted file mode 100644 (file)
index 8864f8e..0000000
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-lnppp/libdisplay_gfx.a and /dev/null differ
index 8864f8e..10dae95 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-n9/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-n9/libdisplay_gfx.a differ
diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-n9ln/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-n9ln/libdisplay_gfx.a
deleted file mode 100644 (file)
index 8864f8e..0000000
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-n9ln/libdisplay_gfx.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230/libuikit_ext.a
deleted file mode 100644 (file)
index 9d278be..0000000
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230/libuikit_ext.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230_user/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230_user/libuikit_ext.a
deleted file mode 100644 (file)
index 9d278be..0000000
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd230_user/libuikit_ext.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd272/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd272/libuikit_ext.a
deleted file mode 100644 (file)
index 9d278be..0000000
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-fd272/libuikit_ext.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-ln/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-ln/libuikit_ext.a
deleted file mode 100644 (file)
index 9d278be..0000000
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-ln/libuikit_ext.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-lnppp/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-lnppp/libuikit_ext.a
deleted file mode 100644 (file)
index 9d278be..0000000
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-lnppp/libuikit_ext.a and /dev/null differ
diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-n9ln/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-n9ln/libuikit_ext.a
deleted file mode 100644 (file)
index 9d278be..0000000
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-n9ln/libuikit_ext.a and /dev/null differ
index 32d1006..8fe6ed4 100644 (file)
@@ -73,14 +73,32 @@ public:
      */\r
     ~UIListExt() override {}\r
 \r
+    /**\r
+     * @brief Obtains the view type.\r
+     *\r
+     * @return Returns <b>UI_LIST_EXT</b>, as defined in {@link UIViewType}.\r
+     */\r
+    UIViewType GetViewType() const override\r
+    {\r
+        return UI_LIST_EXT;\r
+    }\r
+\r
     /**\r
      * @brief Set scale factor witch is used to calculate scale value.\r
+     *        scale = N / scale factor  ( 1 <= N <= scale factor)\r
+     *        A larger scaleFactor value indicates higher scale precision.\r
      *\r
      * @since 1.0\r
      * @version 1.0\r
      */\r
     void SetScaleFactor(int16_t value)\r
     {\r
+        if (value <= 0) {\r
+#ifndef ENABLE_GRAPHIC_LOG\r
+            GRAPHIC_LOGE("Illegal value! Value must bigger than 0");\r
+#endif\r
+            return;\r
+        }\r
         scaleFactor_ = value;\r
     }\r
 \r
index 89c87d9..de94603 100644 (file)
@@ -87,7 +87,7 @@ bool GraphicService::AsyncTriggerNativeGraphicTask()
         OHOS::GraphicEventHandler::GetInstance()->PostGraphicEvent(\r
             [] {\r
                 if (GraphicService::GetInstance()->IsScreenOn() &&\r
-                    isJsTaskFinished_ && // ±ÜÃâJS->Native TaskderHander¶àÏß³ÌÖØÈë\r
+                    isJsTaskFinished_ && // ±ÜÃâJS->Native TaskderHander?????\r
                     GraphicService::GetInstance()->IsNativeRunning()) { // ±ÜÃâNative->JS ¶àÏß³ÌÎÊÌâ\r
                     OHOS::TaskManager::GetInstance()->TaskHandler();\r
                 } else {\r
index e84f7eb..39a0183 100644 (file)
@@ -314,7 +314,7 @@ void UILiteSurfaceView::OnDraw(BufferInfo& gfxDstBuffer, const Rect& invalidated
 void UILiteSurfaceView::OnBufferAvailable()\r
 {\r
     lock_.Lock();\r
-    SurfaceBuffer* back = surface_->GetBackBuf();\r
+    SurfaceBuffer *back = surface_->GetBackBuf();\r
     bool isLastFrame = (back->format == PIXEL_FMT_BUTT);\r
     if (isLastFrame) {\r
         back->format = PIXEL_FMT_YCBCR_420_SP;\r
index 1a63174..194f1f0 100644 (file)
@@ -15,8 +15,8 @@ extern "C" {
 int SampleUi(void);
 
 /*
-  ¹¦ÄÜÃèÊö     :  Æô¶¯Ö¸¶¨ÓÃÀý
-  ²ÎÊýÄÚÈÝ     :  ²ÎÊýΪÓÃÀýÃû³Æ
+  \e$)A\ e9&D\ChJv\ f       :  \ eFt6/V86(SC@}\ f
+  \e$)A\ e2NJ}DZH]\ f       :  \ e2NJ}N*SC@}C{3F\ f
 */
 int StartCaseUi(const char* testCaseId);
 
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230-r/libx_vfs_private.a
deleted file mode 100644 (file)
index ef8c37d..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230-r/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230/libx_vfs_private.a
deleted file mode 100644 (file)
index 1c08fcb..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230_user-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230_user-r/libx_vfs_private.a
deleted file mode 100644 (file)
index ef8c37d..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230_user-r/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230_user/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230_user/libx_vfs_private.a
deleted file mode 100644 (file)
index 1c08fcb..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd230_user/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd272-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd272-r/libx_vfs_private.a
deleted file mode 100644 (file)
index ef8c37d..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd272-r/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd272/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd272/libx_vfs_private.a
deleted file mode 100644 (file)
index 1c08fcb..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-fd272/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln-r/libx_vfs_private.a
deleted file mode 100644 (file)
index ef8c37d..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln-r/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln/libx_vfs_private.a
deleted file mode 100644 (file)
index 1c08fcb..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-ln/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lnppp-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lnppp-r/libx_vfs_private.a
deleted file mode 100644 (file)
index ef8c37d..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lnppp-r/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lnppp/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lnppp/libx_vfs_private.a
deleted file mode 100644 (file)
index 1c08fcb..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-lnppp/libx_vfs_private.a and /dev/null differ
index ef8c37d..7689d31 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9-r/libx_vfs_private.a differ
index 1c08fcb..ff74eab 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9/libx_vfs_private.a differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9ln-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9ln-r/libx_vfs_private.a
deleted file mode 100644 (file)
index ef8c37d..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9ln-r/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9ln/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9ln/libx_vfs_private.a
deleted file mode 100644 (file)
index 1c08fcb..0000000
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-n9ln/libx_vfs_private.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230-r/libfs_yaffs2.a
deleted file mode 100644 (file)
index 00beb36..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230-r/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230/libfs_yaffs2.a
deleted file mode 100644 (file)
index 50e244a..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230_user-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230_user-r/libfs_yaffs2.a
deleted file mode 100644 (file)
index 00beb36..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230_user-r/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230_user/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230_user/libfs_yaffs2.a
deleted file mode 100644 (file)
index 50e244a..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd230_user/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd272-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd272-r/libfs_yaffs2.a
deleted file mode 100644 (file)
index 00beb36..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd272-r/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd272/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd272/libfs_yaffs2.a
deleted file mode 100644 (file)
index 50e244a..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-fd272/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln-r/libfs_yaffs2.a
deleted file mode 100644 (file)
index 00beb36..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln-r/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln/libfs_yaffs2.a
deleted file mode 100644 (file)
index 50e244a..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-ln/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lnppp-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lnppp-r/libfs_yaffs2.a
deleted file mode 100644 (file)
index 00beb36..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lnppp-r/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lnppp/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lnppp/libfs_yaffs2.a
deleted file mode 100644 (file)
index 50e244a..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-lnppp/libfs_yaffs2.a and /dev/null differ
index 00beb36..6b9dd54 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9-r/libfs_yaffs2.a differ
index 50e244a..2a44ced 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9/libfs_yaffs2.a differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9ln-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9ln-r/libfs_yaffs2.a
deleted file mode 100644 (file)
index 00beb36..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9ln-r/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9ln/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9ln/libfs_yaffs2.a
deleted file mode 100644 (file)
index 50e244a..0000000
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-n9ln/libfs_yaffs2.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230/libams.a
deleted file mode 100644 (file)
index b294a76..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230/libams.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230_user/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230_user/libams.a
deleted file mode 100644 (file)
index b294a76..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd230_user/libams.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd272/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd272/libams.a
deleted file mode 100644 (file)
index b294a76..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-fd272/libams.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-ln/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-ln/libams.a
deleted file mode 100644 (file)
index b294a76..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-ln/libams.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-lnppp/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-lnppp/libams.a
deleted file mode 100644 (file)
index b294a76..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-lnppp/libams.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-n9ln/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-n9ln/libams.a
deleted file mode 100644 (file)
index b294a76..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-n9ln/libams.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230/libbms.a
deleted file mode 100644 (file)
index f262ad8..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230/libbms.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230_user/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230_user/libbms.a
deleted file mode 100644 (file)
index f262ad8..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd230_user/libbms.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd272/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd272/libbms.a
deleted file mode 100644 (file)
index f262ad8..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-fd272/libbms.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-ln/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-ln/libbms.a
deleted file mode 100644 (file)
index f262ad8..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-ln/libbms.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-lnppp/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-lnppp/libbms.a
deleted file mode 100644 (file)
index f262ad8..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-lnppp/libbms.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-n9ln/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-n9ln/libbms.a
deleted file mode 100644 (file)
index f262ad8..0000000
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-n9ln/libbms.a and /dev/null differ
diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-n9ln/libjerryscript.a b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-n9ln/libjerryscript.a
deleted file mode 100644 (file)
index bafd4fc..0000000
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-n9ln/libjerryscript.a and /dev/null differ