Merge branch 'sdk602patch0626' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0... 903/3 903/head 909/target/1 910/target/1
authorluozheng <1732036298@qq.com>
Sat, 7 Sep 2024 10:04:12 +0000 (18:04 +0800)
committerluozheng <1732036298@qq.com>
Sat, 7 Sep 2024 10:04:12 +0000 (18:04 +0800)
1  2 
code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp
code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp

@@@ -140,29 -150,10 +150,11 @@@ namespace OHO
       */
      void FlashlightModel::FlashlightStopTimer(void)
      {
-         // 检查定时器是否存在
          if (g_timer != NULL)
          {
-             // 删除定时器并置为 NULL
-             osStatus_t ret = osTimerDelete(g_timer);
-             if (ret != osOK)
-             {
-                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret);
-             }
-             g_timer = NULL;
-         }
-     }
-     /*
-      * @brief 暂停定时器
-      */
-     void FlashlightModel::FlashlightPauseTimer(void)
-     {
-         // 检查定时器是否存在
-         if (g_timer != NULL)
-         {
-             // 暂停定时器,但不删除它
-             osStatus_t ret = osTimerStop(g_timer);
 +            osTimerStop(g_timer);
+             osStatus_t ret = osOK;
+             ret = osTimerStop(g_timer);
              if (ret != osOK)
              {
                  WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FlashlightPauseTimer osTimerStop failed, ret = %lx!!", ret);
@@@ -1373,7 -1373,6 +1373,7 @@@ namespace OHO
          {
              if (g_startCounting != NULL)
              {
-                 PauseTimer();
++                osTimerStop(g_startCounting);
                  osStatus_t ret = osTimerDelete(g_startCounting);
                  if (ret != osOK)
                  {