Merge #380 into sdk602patch0521 from refs/changes/380/head 382/target/1 383/target/1
author袁清梦 <3449750381@qq.com>
Wed, 26 Jun 2024 10:17:40 +0000 (10:17 +0000)
committersnickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Wed, 26 Jun 2024 10:17:40 +0000 (10:17 +0000)
删除部分文件

* refs/changes/380/head: (3 commits squashed)

  - 删除部分文件

  - 心率血氧卡片优化

  - Merge branch &#39;sdk602patch0521&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0521

Signed-off-by: Caisking <3449750381@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Merged-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/380
24 files changed:
code/sdk/application/wearable/fd230app/CMakeLists.txt
code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h
code/sdk/application/wearable/fd230app/nativelauncher/include/NativeLauncher.h
code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenView.cpp
code/sdk/application/wearable/fd230app/nativeui/heart_blood/BloodCardView.cpp [moved from code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/BloodCardView.cpp with 84% similarity]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/BloodCardView.h [moved from code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/BloodCardView.h with 81% similarity]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp
code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartCardView.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartControlPresenter.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartControlView.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartFrequencyView.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartUnusualView.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartCardView.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartControlPresenter.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartControlView.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartFrequencyView.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartUnusualView.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartRateView.cpp
code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartView.cpp
code/sdk/application/wearable/fd230app/nativeui/main/include/MainViewSample.h
code/sdk/application/wearable/fd230app/nativeui/set_card/src/SetMainView.cpp
code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepCardView.cpp
code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/Training_CardView.cpp

index cc4343e..26b8b4f 100644 (file)
@@ -285,8 +285,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/key/src/KeyInputListener.cpp
     
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/screennotify/src/ui_screennotify.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/heart_blood/src/BloodCardView.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/heart_blood/src/HeartCardView.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/heart_blood/BloodCardView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/heart_blood/health_service/health_service.cpp
     
 
index d46d298..3ef5053 100644 (file)
@@ -82,6 +82,7 @@ typedef enum : uint16_t
     VIEW_SET_CARD,     // 卡片管理
     VIEW_ADD_CARD,     // 添加卡片
     VIEW_SET_DIAL,     // 切换表盘
+    VIEW_SET_HEART,    // 设置心率周期检测
     /* ----------------------------------- 训练 ----------------------------------- */
     VIEW_TRAINING,        // 训练
     VIEW_TRAININGNOMAL,   // 正常训练开始界面(除骑行,健走,跑步外)
index 6e9fc2f..cb8cd11 100644 (file)
@@ -75,6 +75,7 @@ namespace OHOS
         void InitMessageShowSlice(void);
         void InitTakePhotosSlice(void);
         void InitSleepSlice(void);
+        void InitSetHeartSlice(void);
         /* ----------------------------------- 训练 ----------------------------------- */
         void InitTraingSlice(void);
         void InitTraingNomalSlice(void);
index 49a8290..b9a1a8c 100644 (file)
@@ -64,7 +64,7 @@
 #include "UISampleView.h"
 #include "UISamplePresenter.h"
 
-#include "heart_blood/include/BloodCardView.h"
+#include "heart_blood/BloodCardView.h"
 
 #include "weather/include/MainWeatherPresenter.h"
 #include "weather/include/MainWeatherView.h"
@@ -357,6 +357,8 @@ namespace OHOS
         {VIEW_SET_DIAL, &NativeLauncher::InitSetDialSlice},
         /*睡眠界面*/
         {VIEW_SLEEP, &NativeLauncher::InitSleepSlice},
+    /*心率周期检测*/
+    //{VIEW_SET_HEART, &NativeLauncher::InitSetHeartSlice},
     /* -------------------------------------------------------------------------- */
 
 #ifdef SUPPORT_ALIPAY_SEC
index 6ee4c6e..d75edf6 100644 (file)
@@ -88,7 +88,7 @@ namespace OHOS
             // 更新数据
             std::string bloodoxygenStr = std::to_string(spo2);
             percent->SetText(bloodoxygenStr.c_str());
-            
+
             // 获取时间差
             uint32_t time = BloodOxygenPresenter::GetInstance()->GetCurrentTime();
             uint32_t check_time = BloodOxygenModel::GetInstance()->GetCheckTime();
@@ -100,7 +100,7 @@ namespace OHOS
             }
             else if (time_diff <= 60)
             {
-                UpdateLabel(timeLabel, time_diff,STR_CHECKNO);
+                UpdateLabel(timeLabel, time_diff, STR_CHECKTIME);
             }
             else
             {
@@ -1,5 +1,5 @@
 \r
-#include "heart_blood/include/BloodCardView.h"\r
+#include "heart_blood/BloodCardView.h"\r
 #include "common/image_cache_manager.h"\r
 #include "UiConfig.h"\r
 #include "ui_resource_image.h"\r
@@ -26,7 +26,6 @@ namespace OHOS
     BloodCardView::~BloodCardView()\r
     {\r
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodCardView::~BloodCardView");\r
-        RemoveAll();\r
         DeInit();\r
         g_pBloodCardView = nullptr;\r
     }\r
@@ -40,22 +39,35 @@ namespace OHOS
     void BloodCardView::UpSPO2Text()\r
     {\r
         // 更新血氧数据\r
-        uint16_t spo2_ = BloodOxygenModel::GetInstance()->GetSPO2data();\r
-        if (spo2_ != 0) // 判断是否为默认数据\r
+        uint16_t spo2 = BloodOxygenModel::GetInstance()->GetSPO2data();\r
+        if (spo2 != 0) // 判断是否为默认数据\r
         {\r
             // 更新数据\r
-            std::string bloodoxygenStr = std::to_string(spo2_);\r
+            std::string bloodoxygenStr = std::to_string(spo2);\r
             bloodLabel->SetText(bloodoxygenStr.c_str());\r
-            //  更新时间\r
+\r
+            // 获取时间差\r
             uint32_t time = BloodOxygenPresenter::GetInstance()->GetCurrentTime();\r
             uint32_t check_time = BloodOxygenModel::GetInstance()->GetCheckTime();\r
-            std::string TimeStr = BloodOxygenPresenter::GetInstance()->GetTDOA(time, check_time) + "检测";\r
-            timeLabel->SetText(TimeStr.c_str());\r
+            int time_diff = BloodOxygenPresenter::GetInstance()->GetTDOA(time, check_time);\r
+\r
+            if (time_diff == 0)\r
+            {\r
+                timeLabel->SetTextId(STR_CHECKNEW);\r
+            }\r
+            else if (time_diff <= 60)\r
+            {\r
+                UpdateLabel(timeLabel, time_diff, STR_CHECKTIME);\r
+            }\r
+            else\r
+            {\r
+                timeLabel->SetTextId(STR_CHECKLONG);\r
+            }\r
         }\r
         else\r
         {\r
             bloodLabel->SetText("--");\r
-            timeLabel->SetText("暂无检测结果");\r
+            timeLabel->SetTextId(STR_CHECKNO);\r
         }\r
     }\r
 \r
@@ -105,7 +117,7 @@ namespace OHOS
         Add(bloodLabel);\r
 \r
         /* -------------------------------------------------------------------------- */\r
-        timeLabel = new UILabel();\r
+        timeLabel = new UILabelExt();\r
         if (timeLabel == nullptr)\r
         {\r
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodOxygenView::new timeLabel fail");\r
@@ -115,19 +127,6 @@ namespace OHOS
         timeLabel->Resize(280, 100);     // widget's width and height\r
         timeLabel->SetViewId("label1");  // Set style\r
         timeLabel->SetStyle(STYLE_TEXT_FONT, 30);\r
-        if (bloodoxygen != 0)\r
-        {\r
-            // 更新时间\r
-            uint32_t time = BloodOxygenPresenter::GetInstance()->GetCurrentTime();\r
-            uint32_t check_time = BloodOxygenModel::GetInstance()->GetCheckTime();\r
-            std::string TimeStr = BloodOxygenPresenter::GetInstance()->GetTDOA(time, check_time) + "检测";\r
-            timeLabel->SetText(TimeStr.c_str());\r
-        }\r
-        else\r
-        {\r
-            timeLabel->SetText("暂无测量记录");\r
-        }\r
-        /* -------------------------------------------------------------------------- */\r
         timeLabel->SetLineBreakMode(UILabel::LINE_BREAK_ELLIPSIS);\r
         timeLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
         timeLabel->SetRollSpeed(0);\r
@@ -136,6 +135,8 @@ namespace OHOS
         // Add to rootView\r
         Add(timeLabel);\r
 \r
+        UpSPO2Text();\r
+\r
         // Add Label to App\r
         if (titleLabel == nullptr)\r
         {\r
@@ -259,7 +260,6 @@ namespace OHOS
 \r
     void BloodCardView::UnLoad(void)\r
     {\r
-#if 0\r
         if (resLoadStatus)\r
         {\r
             ImageInfo *img = nullptr;\r
@@ -267,7 +267,6 @@ namespace OHOS
             ImageCacheManager::GetInstance().UnloadOneInMultiRes(BLOODOXYGEN_BACKGOUND, BLOOD_IAMGES);\r
             resLoadStatus = false;\r
         }\r
-#endif\r
     }\r
     /* -------------------------------------------------------------------------- */\r
 }\r
@@ -1,3 +1,9 @@
+/*** \r
+ * @Date: 2024-06-26 16:13:19\r
+ * @LastEditors: Caisking 3449750381@qq.com\r
+ * @LastEditTime: 2024-06-26 16:52:01\r
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/heart_blood/BloodCardView.h\r
+ */\r
 \r
 #ifndef _Blood_CARD_VIEW_H\r
 #define _Blood_CARD_VIEW_H\r
@@ -50,7 +56,7 @@ namespace OHOS
         UILabelButton *monitorButton = nullptr;\r
         UILabel *titleLabel = nullptr;\r
         UILabel *bloodLabel = nullptr;\r
-        UILabel *timeLabel = nullptr;\r
+        UILabelExt *timeLabel = nullptr;\r
 \r
         bool viewiInitStatus{false};\r
         bool resLoadStatus{false};\r
index 250a49e..a0ce166 100644 (file)
@@ -220,7 +220,7 @@ namespace OHOS
         }
 
         cJSON *SPO2 = cJSON_GetObjectItemCaseSensitive(latestData, "value");
-        if (SPO2 == nullptr && cJSON_IsNumber(SPO2))
+        if (SPO2 == nullptr && !cJSON_IsNumber(SPO2))
         {
             // Add spo2_latest_data
             cJSON_AddItemToObject(latestData, "value", cJSON_CreateNumber(data.SPO2));
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartCardView.h b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartCardView.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartControlPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartControlPresenter.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartControlView.h b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartControlView.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartFrequencyView.h b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartFrequencyView.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartUnusualView.h b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/include/HeartUnusualView.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartCardView.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartCardView.cpp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartControlPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartControlPresenter.cpp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartControlView.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartControlView.cpp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartFrequencyView.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartFrequencyView.cpp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartUnusualView.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/src/HeartUnusualView.cpp
deleted file mode 100644 (file)
index e69de29..0000000
index 4cf64b2..422e524 100644 (file)
@@ -612,7 +612,6 @@ namespace OHOS
                 viewiInitStatus = true;\r
             }\r
         }\r
-\r
         if (!resLoadStatus)\r
         {\r
             ScreenModels::GetInstance()->LoadAppImages(HEART_IAMGES, imageViewTop, HEART_HEARTRATE_TOP);\r
@@ -865,4 +864,110 @@ namespace OHOS
             }\r
         }\r
     }\r
+#if 0\r
+#ifdef __cplusplus\r
+    extern "C"\r
+    {\r
+#endif\r
+        /* 定时器回调函数 */\r
+        void HeartTimerCallback()\r
+        {\r
+            g_motionTimes++;\r
+            HeartCardPresenter *gHeartCardPresenter = HeartPresenter::GetInstance();\r
+            if (gHeartCardPresenter == nullptr)\r
+            {\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartTimerCallback::gHeartCardPresenter new fail");\r
+                return;\r
+            }\r
+            // gHeartCardPresenter->ModifiesTime();\r
+            PRINT("HeartTimerCallback\r\n");\r
+        }\r
+\r
+        /* 开启定时器 */\r
+        void InitTimer(void)\r
+        {\r
+            if (g_startCounting != NULL)\r
+            {\r
+                WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "HeartModel::HeartTimer already exists!!");\r
+                return;\r
+            }\r
+            g_startCounting = osTimerNew((osTimerFunc_t)HeartTimerCallback, osTimerPeriodic, NULL, NULL);\r
+            if (g_startCounting == NULL)\r
+            {\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartModel::HeartTimer osTimerNew failed!!");\r
+                return;\r
+            }\r
+            int tick = osMs2Tick(MS_ONE_SECONDS);\r
+            osStatus_t retTimer = osTimerStart(g_startCounting, tick);\r
+            if (retTimer != osOK)\r
+            {\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartModel::HeartTimer osTimerStart failed, ret = %lx!!", retTimer);\r
+                if (g_startCounting != NULL)\r
+                {\r
+                    retTimer = osTimerDelete(g_startCounting);\r
+                    if (retTimer != osOK)\r
+                    {\r
+                        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "HeartModel::osTimerDelete failed, ret = %lx!!", retTimer);\r
+                        return;\r
+                    }\r
+                    g_startCounting = NULL;\r
+                }\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitTimer!");\r
+                return;\r
+            }\r
+        }\r
+        /* 关闭定时器 */\r
+        void DisableTimer(void)\r
+        {\r
+            if (g_startCounting != NULL)\r
+            {\r
+                osStatus_t ret = osTimerDelete(g_startCounting);\r
+                if (ret != osOK)\r
+                {\r
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret);\r
+                    return;\r
+                }\r
+                g_startCounting = NULL;\r
+                PRINT("g_motionTimes:%d\r\n", sportdata->duration);\r
+                g_motionTimes = 0;\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DisableTimer!");\r
+            }\r
+        }\r
+        /* 暂停定时器 */\r
+        void PauseTimer(void)\r
+        {\r
+            // 检查定时器是否存在\r
+            if (g_startCounting != NULL)\r
+            {\r
+                // 暂停定时器,但不删除它\r
+                osStatus_t ret = osTimerStop(g_startCounting);\r
+                if (ret != osOK)\r
+                {\r
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "StopWatch_PauseTimer osTimerStop failed, ret = %lx!!", ret);\r
+                }\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PauseTimer!");\r
+            }\r
+        }\r
+\r
+        /*恢复定时器*/\r
+        void ResumeTimer(void)\r
+        {\r
+            // 检查定时器是否存在\r
+            if (g_startCounting != NULL)\r
+            {\r
+                int tick = osMs2Tick(MS_ONE_SECONDS);\r
+                // 恢复定时器\r
+                osStatus_t ret = osTimerStart(g_startCounting, tick);\r
+                if (ret != osOK)\r
+                {\r
+                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ResumeTimer osTimerStart failed, ret = %lx!!", ret);\r
+                }\r
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ResumeTimer!");\r
+            }\r
+        }\r
+\r
+#ifdef __cplusplus\r
+    }\r
+#endif\r
+#endif\r
 } // namespace OHOS\r
index 40eda29..d0398a9 100644 (file)
@@ -115,7 +115,7 @@ namespace OHOS
             }
             else if (time_diff <= 60)
             {
-                UpdateLabel(timeLabel, time_diff, STR_CHECKNO);
+                UpdateLabel(timeLabel, time_diff, STR_CHECKTIME);
             }
             else
             {
index 39faea9..df76321 100644 (file)
@@ -32,7 +32,7 @@
 #include "uicomponents/UIComponents.h"
 
 #include "SetCardModel.h"
-#include "heart_blood/include/BloodCardView.h"
+#include "heart_blood/BloodCardView.h"
 #include "traing/training_card/include/Training_CardView.h"
 // #include "ApplistCardView.h"
 #include "weather/include/WeatherControlView.h"
index 63bfdb3..3e5b12e 100644 (file)
@@ -1,3 +1,9 @@
+/***
+ * @Date: 2024-06-11 20:17:37
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-06-26 11:25:56
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/set_card/src/SetMainView.cpp
+ */
 /***
  * @Date: 2024-06-11 20:17:37
  * @LastEditors: Caisking 3449750381@qq.com
@@ -31,7 +37,6 @@ namespace OHOS
     SetMainView::~SetMainView()
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetMainView::~SetMainView");
-        RemoveAll();
         DeInit();
         g_pSetMainView = nullptr;
     }
@@ -87,15 +92,6 @@ namespace OHOS
     }
     void SetMainView::UnLoad(void)
     {
-#if 0
-        if (resLoadStatus)
-        {
-            ImageInfo *img = nullptr;
-            background->SetSrc(img);
-            ImageCacheManager::GetInstance().UnloadOneInMultiRes(BLOODOXYGEN_BACKGOUND, BLOOD_IAMGES);
-            resLoadStatus = false;
-        }
-#endif
     }
     /* -------------------------------------------------------------------------- */
 }
index 780c41c..62bb9a1 100644 (file)
@@ -1,3 +1,9 @@
+/***\r
+ * @Date: 2024-06-25 10:41:40\r
+ * @LastEditors: Caisking 3449750381@qq.com\r
+ * @LastEditTime: 2024-06-26 11:27:04\r
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepCardView.cpp\r
+ */\r
 #include "sleep/include/SleepCardView.h"\r
 #include "sleep/include/SleepControlView.h"\r
 #include "sleep/include/SleepControlPresenter.h"\r
@@ -27,7 +33,7 @@ namespace OHOS
                     delete sleepOnSwipeListener;\r
                     sleepOnSwipeListener = nullptr;\r
                 }\r
-                \r
+\r
                 if (sleepcontrolView != nullptr)\r
                 {\r
                     delete sleepcontrolView;\r
@@ -62,7 +68,7 @@ namespace OHOS
         }\r
         SleepSwipView->SetOnSwipeListener(sleepOnSwipeListener);\r
         Add(SleepSwipView);\r
-       \r
+\r
         return true;\r
     }\r
 \r
@@ -78,7 +84,6 @@ namespace OHOS
 \r
     void SleepCardView::UnLoad(void)\r
     {\r
-        // Weather's usage scenes is complicated, so we do not release it's resources inner slice.\r
     }\r
 \r
 }
\ No newline at end of file
index d4cd21c..ad3d6e5 100644 (file)
@@ -220,21 +220,19 @@ namespace OHOS
     {\r
         if (!viewiInitStatus)\r
         {\r
+            // 加载组件 ,加载imagecache\r
             InitView();\r
             viewiInitStatus = true;\r
         }\r
-        // if (!resLoadStatus)\r
-        // {\r
-        //     resLoadStatus = true;\r
-        // }\r
     }\r
 \r
     void Training_CardView::UnLoad(void)\r
     {\r
-        // if (resLoadStatus)\r
-        // {\r
-        //     //ImageCacheManager::GetInstance().UnloadAllInMultiRes(TRAINING_IAMGES);\r
-        //     resLoadStatus = false;\r
-        // }\r
+#if 0\r
+        if (viewiInitStatus)\r
+        {\r
+            ImageCacheManager::GetInstance().UnloadAllInMultiRes(TRAINING_IAMGES);\r
+        }\r
+#endif\r
     }\r
 }\r