From: hcj <1224667075@qq.com> Date: Tue, 13 Aug 2024 09:32:26 +0000 (+0800) Subject: 增加表盘安装完自动关闭传输界面 X-Git-Tag: release_V1.2.70_20241020_135402~674 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=7bc33d5ff0be3326643f50749206a54bba2a1c1b;p=mirrors%2FFD230.git 增加表盘安装完自动关闭传输界面 --- diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp index bfb23859b..0c6d24eba 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp @@ -140,6 +140,8 @@ namespace OHOS } if(transmitting_timer) { + + osTimerStop(transmitting_timer); osStatus_t ret = osTimerDelete(transmitting_timer); if (ret != osOK) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Disatransmitting_timer failed ret = %lx!", ret); @@ -170,6 +172,11 @@ namespace OHOS RootView::GetInstance()->Invalidate(); } + void dialtimerCallBack(int data) + { + NotificationManager::GetInstance()->StopNotify(); + } + void creat_down_OTA() @@ -453,6 +460,19 @@ namespace OHOS transmitting_img->SetSrc(imagesPath); UIViewGroup_transmitting->Add(transmitting_img); + uint32_t tick; + osStatus_t retTimer; + + transmitting_timer = osTimerNew((osTimerFunc_t)dialtimerCallBack, osTimerPeriodic, NULL, NULL); + tick =2000;// osMs2Tick(1000); + retTimer = osTimerStart(transmitting_timer, tick); + if (retTimer != osOK && transmitting_timer != NULL) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"StartCallTimer osTimerStart failed, ret = %lx!!", retTimer); + osTimerDelete(transmitting_timer); + transmitting_timer = NULL; + return ; + } + // Add to rootView UIViewGroup_transmitting->Add(label_); label_->SetVisible(true);