删除不必要的注释 735/1
authorCaisking <3449750381@qq.com>
Tue, 20 Aug 2024 07:19:37 +0000 (15:19 +0800)
committerCaisking <3449750381@qq.com>
Tue, 20 Aug 2024 07:19:37 +0000 (15:19 +0800)
code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp

index 1de307f..3cdc902 100644 (file)
@@ -707,28 +707,19 @@ namespace OHOS
     void SleepModel::Sleep_StartTimer(uint32_t interval)
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SleepModel::Sleep_StartTimer");
-        /* -------------------------- 1.检查定时器是否已经存在,如果存在则返回 ------------------------- */
         if (g_timer != NULL)
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CountDownModel::CountDown_StartTimer Timer already exists!!");
             return;
         }
-
-        /* --------------------------------- 2.创建定时器 -------------------------------- */
         g_timer = osTimerNew((osTimerFunc_t)Sleep_TimerCallback, osTimerOnce, NULL, NULL);
-        // 检查定时器创建是否成功
         if (g_timer == NULL)
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CountDownModel::CountDown_StartTimer Timer create failed!!");
             return;
         }
-
-        /* ----------------------------- 3.将毫秒转换为系统时钟节拍数 ---------------------------- */
         int tick = osMs2Tick(interval);
-
-        /* --------------------------------- 4.启动定时器 -------------------------------- */
         osStatus_t ret = osTimerStart(g_timer, tick);
-        /* -------------------- 5.检查定时器启动是否成功,如果启动失败,删除定时器并置为 NULL -------------------- */
         if (ret != osOK)
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CountDown_StartTimer] osTimerDelete failed, ret = %lx!!", ret);
@@ -756,13 +747,13 @@ namespace OHOS
             g_timer = NULL;
         }
     }
-
+    /* -------------------------------------------------------------------------- */
     void SleepModel::EnterSleepModeAction(void)
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d]:EnterSleepModeAction]", __LINE__);
         // switch on
-        mmi_sleep_mode_flag_set(true);
-        
+        // mmi_sleep_mode_flag_set(true);
+
         // switch on donotdisturb
         DeviceStateBeforeSleep_.DnotdisturbFlag = OHOS::ConfigModel::GetInstance()->GetDnotdisturb();
         OHOS::ConfigModel::GetInstance()->SetDnotdisturb(true); // 开启勿扰
@@ -775,14 +766,13 @@ namespace OHOS
         // turn down brightness
         const power_display_svr_api_t *display_api = power_display_svr_get_api();
         display_api->set_brightness(51);
-
     }
 
     void SleepModel::ExitSleepModeAction(void)
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d]:ExitSleepModeAction]", __LINE__);
         // switch off
-        mmi_sleep_mode_flag_set(false);
+        // mmi_sleep_mode_flag_set(false);
 
         // reset donotdisturb
         bool DnotdisturbFlag = DeviceStateBeforeSleep_.DnotdisturbFlag;
@@ -796,6 +786,5 @@ namespace OHOS
         // reset brightness
         const power_display_svr_api_t *display_api = power_display_svr_get_api();
         display_api->set_brightness(OHOS::ConfigModel::GetInstance()->GetBrightness());
-
     }
 }
\ No newline at end of file