#include "custom_save_runtime.h"
#include "transmitting.h"
#include "charge_notification.h"
+#include "motion_recognition_notification.h"
+
#ifdef SUPPORT_POWER_MANAGER
#include "power_display_service.h"
{TOPIC_EVENT_HFP_PHONE_TO_WATCH, PRIORITY_ONE},
{TOPIC_EVENT_DEVICE_BIND, PRIORITY_ONE},
{TOPIC_EVENT_BLE_TRANSMIT,PRIORITY_ONE},
+ // #ifdef SUPPORT_CHARGER_PLUG_DETECTION_NOTIFICATION
{TOPIC_EVENT_CHARGE_PLUG, PRIORITY_TWO},
{TOPIC_EVENT_CHARGE_UNPLUG, PRIORITY_TWO},
{TOPIC_EVENT_LOWPOWER_ALARM,PRIORITY_TWO},
- // {TOPIC_EVENT_DEVICE_UNBIND, PRIORITY_TWO},
- // {TOPIC_EVENT_DEVICE_UNBINDING_REQUEST, PRIORITY_TWO},
+ // #endif
+ // #ifdef SUPPORT_CYWEE_SERVICE
+ {TOPIC_EVENT_AR_ALERT_TYPE_UPDATE, PRIORITY_TWO},
+ // #endif
};
MsgCenterSubscribeTopic(TOPIC_EVENT_HFP_WATCH_TO_PHONE);
MsgCenterSubscribeTopic(TOPIC_EVENT_DEVICE_BIND);
MsgCenterSubscribeTopic(TOPIC_EVENT_BLE_TRANSMIT);
+ // #ifdef SUPPORT_CHARGER_PLUG_DETECTION_NOTIFICATION
MsgCenterSubscribeTopic(TOPIC_EVENT_CHARGE_PLUG);
MsgCenterSubscribeTopic(TOPIC_EVENT_CHARGE_UNPLUG);
MsgCenterSubscribeTopic(TOPIC_EVENT_LOWPOWER_ALARM);
+ // #endif
+ // #ifdef SUPPORT_CYWEE_SERVICE
+ MsgCenterSubscribeTopic(TOPIC_EVENT_AR_ALERT_TYPE_UPDATE);
+ // #endif
}
return OHOS::lowPowerShow();
}
+/*显示运动识别视图*/
+static OHOS::UIViewGroup* showMotionRecognitionNotify(void)
+{
+ return OHOS::CreateMotionRecognitionView();
+}
+
void MsgCenterNotifyAlarmProc(const Topic topic, Request* req)
{
unused(req);
// }
#endif
}
+
+/*运动识别*/
+void MsgCenterNotifyArAlertProc(const Topic topic, Request* req)
+{
+ uint8_t* motionType=(uint8_t*)req->data;
+ WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyArAlertProc,motionType = %d !",*motionType);
+ MotionRecognitionViewEventListener::GetInstance().record_motion_recognition_log();
+ if(*motionType > 5 || *motionType <1) //未知运动不弹窗
+ {
+ return;
+ }
+ if (CheckPriority(topic))
+ {
+ MotionRecognitionViewEventListener::GetInstance().SetMotionTypeId(*motionType);
+ NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_TWO);
+ NotificationManager::GetInstance()->ShowNotify(showMotionRecognitionNotify, (uint16_t)topic, true);
+ }
+
+}
#endif
/* 订阅事件通知逻辑可定制 */
{TOPIC_EVENT_HFP_PHONE_TO_WATCH, MsgCenterNotifyHfpWatchProc},
{TOPIC_EVENT_BLE_TRANSMIT, MsgCenterNotifybleTransmit},
{TOPIC_EVENT_DEVICE_BIND, MsgCenterNotifyDeviceBindProc},
+ // #ifdef SUPPORT_CHARGER_PLUG_DETECTION_NOTIFICATION
{TOPIC_EVENT_CHARGE_PLUG, MsgCenterNotifyChargePlugProc},
{TOPIC_EVENT_CHARGE_UNPLUG, MsgCenterNotifyChargeUnPlugProc},
{TOPIC_EVENT_LOWPOWER_ALARM, MsgCenterNotifyLowPowerAlarmProc},
+ // #endif
+ // #ifdef SUPPORT_CYWEE_SERVICE
+ {TOPIC_EVENT_AR_ALERT_TYPE_UPDATE, MsgCenterNotifyArAlertProc},
+ // #endif
// {TOPIC_EVENT_DEVICE_UNBIND, MsgCenterNotifyDeviceUnBindProc},
// {TOPIC_EVENT_DEVICE_UNBINDING_REQUEST, MsgCenterNotifyDeviceUnBindingRequestProc},
--- /dev/null
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-08-17 16:44:20
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-11-05 14:55:35
+ * @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/motion_recognition_notification.cpp
+ */
+#include "notification_manager.h"
+
+#include "notification_manager.h"
+#include "wearable_log.h"
+#include "components/ui_button.h"
+#include "components/ui_image_view.h"
+#include "components/ui_label_ext.h"
+#include "components/ui_scroll_view.h"
+#ifdef FD230
+#include "ui_resource_string.h"
+#endif
+#include <service/graphic_service.h>
+#include "ConfigModel.h"
+#include "traing/include/TraingModel.h"
+#include "uiservice/include/ui_service.h"
+#include "vibrator_service.h"
+#include "custom_runtime.h"
+#include "system/include/SystemLogModel.h"
+#include <custom_utils.h>
+#include "motion_recognition_notification.h"
+
+namespace OHOS
+{
+
+ UIViewGroup *MotionRecognitionGroupView{nullptr};
+ UIScrollView *MotionRecognitionScrollView{nullptr};
+ UIImageView *MotionRecognitionImage{nullptr};
+ UILabelExt *MotionRecognitionNoteLabel{nullptr}; // 运动识别note
+ UILabelExt *MotionRecognitionStartLabel{nullptr}; /*开始lable*/
+ UIButton *MotionRecognitionStartButton{nullptr}; /*开始button*/
+ UILabelExt *MotionRecognitionIgnoreLabel{nullptr}; /*忽略lable*/
+ UIButton *MotionRecognitionIgnoreButton{nullptr}; /*忽略button*/
+
+ static constexpr const int X_DRAG_OFFSET = 20;
+ static constexpr const int DOUBLES = 2;
+
+ static constexpr const char *MOTION_RECOGNITION_GROUPVIEWID = "motion_recognition_groupviewid";
+ static constexpr const char *MOTION_RECOGNITION_IGNORE_BUTTONVIEWID = "motion_recognition_ignore_buttonviewid";
+ static constexpr const char *MOTION_RECOGNITION_START_BUTTONVIEWID = "motion_recognition_start_buttonviewid";
+
+ MotionRecognitionViewEventListener::MotionRecognitionViewEventListener()
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MotionRecognitionViewEventListener::MotionRecognitionViewEventListener");
+ }
+
+ MotionRecognitionViewEventListener::~MotionRecognitionViewEventListener()
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MotionRecognitionViewEventListener::~MotionRecognitionViewEventListener");
+ }
+
+ MotionRecognitionViewEventListener &MotionRecognitionViewEventListener::GetInstance()
+ {
+ static MotionRecognitionViewEventListener instance;
+ return instance;
+ }
+
+ bool MotionRecognitionViewEventListener::OnRelease(UIView &view, const ReleaseEvent &event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MotionRecognitionViewEventListener::OnRelease");
+ UNUSED(event);
+ std::string viewId = view.GetViewId();
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "%s onclick", viewId.c_str());
+ if (viewId == MOTION_RECOGNITION_IGNORE_BUTTONVIEWID)
+ {
+ NotificationManager::GetInstance()->StopNotify();
+ }
+ else if (viewId == MOTION_RECOGNITION_START_BUTTONVIEWID) /*开始运动*/
+ {
+ /*关闭弹窗*/
+ NotificationManager::GetInstance()->StopNotify();
+ /*开始运动*/
+ UIResourceTextId sportId = GetMotionTypeTextId();
+ TraingModel::GetInstance()->set_sport_config(sportId);
+ }
+
+ return true;
+ }
+
+ bool MotionRecognitionViewEventListener::OnDrag(UIView &view, const DragEvent &event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MotionRecognitionViewEventListener::OnDrag");
+ UNUSED(view);
+ if ((event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) // 拖动过程中判断是否是水平滑动
+ {
+ MotionRecognitionViewEventListener::X_DRAG_FLAG = true;
+ }
+ return true;
+ }
+
+ bool MotionRecognitionViewEventListener::OnDragEnd(UIView &view, const DragEvent &event)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MotionRecognitionViewEventListener::OnDragEnd");
+ std::string viewId = view.GetViewId();
+ if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && MotionRecognitionViewEventListener::X_DRAG_FLAG)
+ {
+ if (viewId == MOTION_RECOGNITION_GROUPVIEWID)
+ {
+ NotificationManager::GetInstance()->StopNotify();
+ }
+ MotionRecognitionViewEventListener::X_DRAG_FLAG = false;
+ }
+ return true;
+ }
+
+ void MotionRecognitionViewEventListener::SetMotionTypeId(int type)
+ {
+ motionTypeId = type;
+ }
+
+ int MotionRecognitionViewEventListener::GetMotionType(void)
+ {
+ int motionType;
+ switch (motionTypeId)
+ {
+ case 1:
+ motionType = STR_MOTION_DETECTION_WALK_NOTE;
+ break;
+ case 2:
+ motionType = STR_MOTION_DETECTION_RUN_NOTE;
+ break;
+ case 3:
+ motionType = STR_MOTION_DETECTION_RIDE_NOTE;
+ break;
+ case 4:
+ motionType = STR_MOTION_DETECTION_ROWING_NOTE;
+ break;
+ case 5:
+ motionType = STR_MOTION_DETECTION_ELLIPTICAL_NOTE;
+ break;
+ }
+ return motionType;
+ }
+
+ UIResourceTextId MotionRecognitionViewEventListener::GetMotionTypeTextId(void)
+ {
+ UIResourceTextId motionTypeTextId;
+ switch (motionTypeId)
+ {
+ case 1:
+ motionTypeTextId = STR_EXERCISE_OUTDOORWALKING;
+ break;
+ case 2:
+ motionTypeTextId = STR_EXERCISE_OUTDOORRUNNING;
+ break;
+ case 3:
+ motionTypeTextId = STR_EXERCISE_OUTDOORBIKING;
+ break;
+ case 4:
+ motionTypeTextId = STR_EXERCISE_ROWINGMACHINE;
+ break;
+ case 5:
+ motionTypeTextId = STR_EXERCISE_ELLIPTICALTRAINER;
+ break;
+ }
+ return motionTypeTextId;
+ }
+
+ // 记录运动识别日志
+ void MotionRecognitionViewEventListener::record_motion_recognition_log(void)
+ {
+ // popup_windows_log_data systemlog;
+ // systemlog.timestamp = SystemLogModel::GetInstance()->GetCurrentTime();
+ // systemlog.type = popup_windows_type::MOTION_RECOGNITION;
+ // SystemLogModel::GetInstance()->save_popup_windows_log(systemlog);
+ uint8_t type = 0;
+ do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_POPUP_WINDOWS_DATA_LIST, &type, sizeof(type));
+ }
+
+ static std::string UpdateNoteLabelText(UILabelExt *&label, const std::string &newText, int id)
+ {
+ if (label == nullptr)
+ {
+ return nullptr;
+ }
+ /*取Id对应的字符串*/
+ UILabelExt *labelext = new UILabelExt();
+ labelext->SetTextId(id);
+ std::string text = labelext->GetText();
+
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UpdateLabel:%s->%s\r\n", text.c_str(), newText.c_str());
+
+ // 找到标志"XX"在字符串中的位置
+ size_t pos = text.find("XX");
+ if (pos != std::string::npos)
+ {
+ // 替换标志"XX"为更新字符串
+ text.replace(pos, 2, newText); // 2 是标志"XX"的长度
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "newText:%s\r\n", text.c_str());
+ label->SetText(text.c_str());
+ }
+ else
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "找不到变量标志位XX,请注意是否已经被修改!");
+ }
+
+ delete labelext;
+ return text;
+ }
+
+ /*创建运动识别视图*/
+ UIViewGroup *CreateMotionRecognitionView(void)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CreateMotionRecognitionView(void)");
+ if (MotionRecognitionGroupView == nullptr)
+ {
+ MotionRecognitionGroupView = new UIViewGroup();
+ if (MotionRecognitionGroupView == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CreateMotionRecognitionView] MotionRecognitionGroupView new fail!!");
+ return nullptr;
+ }
+ MotionRecognitionGroupView->SetPosition(0, 0, 466, 466);
+ MotionRecognitionGroupView->SetViewId(MOTION_RECOGNITION_GROUPVIEWID);
+ MotionRecognitionGroupView->SetTouchable(true);
+ MotionRecognitionGroupView->SetDraggable(true);
+ UIView::OnDragListener *dragListener = static_cast<UIView::OnDragListener *>(&MotionRecognitionViewEventListener::GetInstance());
+ if (dragListener == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CreateMotionRecognitionView] dragListener new fail!!");
+ return nullptr;
+ }
+ MotionRecognitionGroupView->SetOnDragListener(dragListener);
+ /* ----------------------- MotionRecognitionScrollView ---------------------- */
+ if (MotionRecognitionScrollView == nullptr)
+ {
+ MotionRecognitionScrollView = new UIScrollView();
+ if (MotionRecognitionScrollView == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MotionRecognitionScrollView new fail");
+ return nullptr;
+ }
+ }
+ MotionRecognitionScrollView->SetPosition(0, 0, 466, 466);
+ MotionRecognitionScrollView->SetScrollBlankSize(50);
+ MotionRecognitionScrollView->SetReboundSize(35);
+ MotionRecognitionScrollView->SetThrowDrag(true);
+ MotionRecognitionScrollView->SetMaxScrollDistance(1000);
+ MotionRecognitionScrollView->SetDirection(UIScrollView::VERTICAL);
+ /* --------------------------- MotionRecognitionImage --------------------------- */
+ MotionRecognitionImage = new UIImageView();
+ if (MotionRecognitionImage == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CreateMotionRecognitionView] MotionRecognitionImage new fail!!");
+ return nullptr;
+ }
+ MotionRecognitionImage->SetPosition(173, 80, 120, 80);
+ MotionRecognitionImage->SetAutoEnable(false);
+ MotionRecognitionImage->SetResizeMode(UIImageView::CENTER);
+ MotionRecognitionImage->SetSrc("/user/res/MotionRecognition/MotionRecognition.bin");
+ /* ------------------------- MotionRecognitionNoteLabel ------------------------- */
+ MotionRecognitionNoteLabel = new UILabelExt();
+ if (MotionRecognitionNoteLabel == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CreateMotionRecognitionView] MotionRecognitionNoteLabel new fail!!");
+ return nullptr;
+ }
+ MotionRecognitionNoteLabel->SetPosition(53, 210, 360, 70);
+ MotionRecognitionNoteLabel->SetStyle(STYLE_TEXT_FONT, 30);
+ MotionRecognitionNoteLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
+#ifdef FD230
+ MotionRecognitionNoteLabel->SetTextId(MotionRecognitionViewEventListener::GetInstance().GetMotionType());
+#endif
+ MotionRecognitionNoteLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
+ MotionRecognitionNoteLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ MotionRecognitionNoteLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+ /* ---------------------- MotionRecognitionIgnoreButton --------------------- */
+ if (MotionRecognitionIgnoreButton == nullptr)
+ {
+ MotionRecognitionIgnoreButton = new UIButton();
+ }
+ MotionRecognitionIgnoreButton->SetPosition(58, MotionRecognitionNoteLabel->GetY() + MotionRecognitionNoteLabel->GetHeight() + 40, 170, 90);
+ MotionRecognitionIgnoreButton->SetViewId(MOTION_RECOGNITION_IGNORE_BUTTONVIEWID);
+ MotionRecognitionIgnoreButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+ MotionRecognitionIgnoreButton->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff383838, UIButton::PRESSED);
+ MotionRecognitionIgnoreButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);
+ UIView::OnTouchListener *TouchListener1 = static_cast<UIView::OnTouchListener *>(&MotionRecognitionViewEventListener::GetInstance());
+ if (TouchListener1 == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CreateMotionRecognitionView] TouchListener1 new fail!!");
+ return nullptr;
+ }
+ MotionRecognitionIgnoreButton->SetOnTouchListener(TouchListener1);
+ /* ---------------------- MotionRecognitionIgnoreLabel ---------------------- */
+ MotionRecognitionIgnoreLabel = new UILabelExt();
+ if (MotionRecognitionIgnoreLabel == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CreateMotionRecognitionView] MotionRecognitionIgnoreLabel new fail!!");
+ return nullptr;
+ }
+ MotionRecognitionIgnoreLabel->SetPosition(93, MotionRecognitionIgnoreButton->GetY() + 30, 100, 30);
+ MotionRecognitionIgnoreLabel->SetStyle(STYLE_TEXT_FONT, 30);
+ MotionRecognitionIgnoreLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
+#ifdef FD230
+ MotionRecognitionIgnoreLabel->SetTextId(STR_IGNORE);
+#endif
+ MotionRecognitionIgnoreLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);
+ MotionRecognitionIgnoreLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ MotionRecognitionIgnoreLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+ /* ---------------------- MotionRecognitionStartButton --------------------- */
+ if (MotionRecognitionStartButton == nullptr)
+ {
+ MotionRecognitionStartButton = new UIButton();
+ }
+ MotionRecognitionStartButton->SetPosition(238, MotionRecognitionNoteLabel->GetY() + MotionRecognitionNoteLabel->GetHeight() + 40, 170, 90);
+ MotionRecognitionStartButton->SetViewId(MOTION_RECOGNITION_START_BUTTONVIEWID);
+ MotionRecognitionStartButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff4fc34c);
+ MotionRecognitionStartButton->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff383838, UIButton::PRESSED);
+ MotionRecognitionStartButton->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);
+ UIView::OnTouchListener *TouchListener2 = static_cast<UIView::OnTouchListener *>(&MotionRecognitionViewEventListener::GetInstance());
+ if (TouchListener2 == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CreateMotionRecognitionView] TouchListener2 new fail!!");
+ return nullptr;
+ }
+ MotionRecognitionStartButton->SetOnTouchListener(TouchListener2);
+ /* ---------------------- MotionRecognitionStartLabel ---------------------- */
+ MotionRecognitionStartLabel = new UILabelExt();
+ if (MotionRecognitionStartLabel == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CreateMotionRecognitionView] MotionRecognitionStartLabel new fail!!");
+ return nullptr;
+ }
+ MotionRecognitionStartLabel->SetPosition(273, MotionRecognitionStartButton->GetY() + 30, 100, 30);
+ MotionRecognitionStartLabel->SetStyle(STYLE_TEXT_FONT, 30);
+ MotionRecognitionStartLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
+#ifdef FD230
+ MotionRecognitionStartLabel->SetTextId(STR_START);
+#endif
+ MotionRecognitionStartLabel->SetLineBreakMode(UILabel::LINE_BREAK_OSCILLATION);
+ MotionRecognitionStartLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ MotionRecognitionStartLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Create MotionRecognitionView succeed!!");
+ /* ----------------------------------- Add ---------------------------------- */
+ MotionRecognitionScrollView->Add(MotionRecognitionImage);
+ MotionRecognitionScrollView->Add(MotionRecognitionNoteLabel);
+ MotionRecognitionScrollView->Add(MotionRecognitionStartButton);
+ MotionRecognitionScrollView->Add(MotionRecognitionStartLabel);
+ MotionRecognitionScrollView->Add(MotionRecognitionIgnoreButton);
+ MotionRecognitionScrollView->Add(MotionRecognitionIgnoreLabel);
+ MotionRecognitionGroupView->Add(MotionRecognitionScrollView);
+ }
+ /* -------------------------------------------------------------------------- */
+ ScreenTurnOn(10 * 1000); // 显示时长10s
+ // 震动一次
+ if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get()))
+ {
+ ui_api_vibrate_once_func();
+ }
+ /* -------------------------------------------------------------------------- */
+ NotificationManager::GetInstance()->RegisterNotifyCleanupFunction(FreeMotionRecognitionView);
+ return MotionRecognitionGroupView;
+ }
+
+ /*释放运动识别视图*/
+ void FreeMotionRecognitionView(void)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "FreeMotionRecognitionView(void)");
+ if (MotionRecognitionGroupView != nullptr)
+ {
+ MotionRecognitionGroupView->RemoveAll();
+ if (MotionRecognitionScrollView != nullptr)
+ {
+ MotionRecognitionScrollView->RemoveAll();
+ delete MotionRecognitionImage;
+ MotionRecognitionImage = nullptr;
+
+ delete MotionRecognitionNoteLabel;
+ MotionRecognitionNoteLabel = nullptr;
+
+ delete MotionRecognitionStartLabel;
+ MotionRecognitionStartLabel = nullptr;
+
+ delete MotionRecognitionStartButton;
+ MotionRecognitionStartButton = nullptr;
+
+ delete MotionRecognitionIgnoreLabel;
+ MotionRecognitionIgnoreLabel = nullptr;
+
+ delete MotionRecognitionIgnoreButton;
+ MotionRecognitionIgnoreButton = nullptr;
+
+ delete MotionRecognitionScrollView;
+ MotionRecognitionScrollView = nullptr;
+ }
+ RootView::GetInstance()->Remove(MotionRecognitionGroupView);
+ delete MotionRecognitionGroupView;
+ MotionRecognitionGroupView = nullptr;
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Free MotionRecognitionView succeed!!");
+ ScreenTurnOff();
+ }
+ return;
+ }
+
+}
\ No newline at end of file