From: Caisking <3449750381@qq.com> Date: Tue, 20 Aug 2024 07:19:37 +0000 (+0800) Subject: 删除不必要的注释 X-Git-Tag: release_V1.2.70_20241020_135402~617^2~11 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F735%2F1;p=mirrors%2FFD230.git 删除不必要的注释 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp index 1de307fcf..3cdc90268 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/sleep/src/SleepModel.cpp @@ -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