From: hcj <1224667075@qq.com> Date: Mon, 1 Jul 2024 06:59:05 +0000 (+0800) Subject: 表盘BUG修复 X-Git-Tag: release_V1.2.70_20241020_135402~895^2~7 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F423%2F1;p=mirrors%2FFD230.git 表盘BUG修复 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp index b9d56647b..770037a22 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp @@ -136,11 +136,13 @@ namespace OHOS /* 注册表盘map */ void SetDialModel::RegisterDial(uint16_t ID, const char *dialname) { + if(ID==0 || strlen(dialname)==0) + return; registeredDials[ID] = std::string(dialname); // 唯一性 - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RegisterDial %s is ok!", dialname); - + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RegisterDial %d %s is ok!",ID, dialname); + LoadAllDial(); saveDialfile(); @@ -224,6 +226,8 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UninstallDial the dial %d is ok", ID); registeredDials.erase(ID); + LoadAllDial(); + return true; }