From: hcj <1224667075@qq.com> Date: Mon, 17 Jun 2024 03:02:48 +0000 (+0800) Subject: 修复删除表盘BUG X-Git-Tag: release_V1.2.70_20241020_135402~992^2~2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F298%2F2;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 2aba5345d..c0dfabfcc 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 @@ -222,7 +222,7 @@ namespace OHOS return false; } - registeredDials.erase(ID); + /*删除文件操作*/ std::string dialFullName = APP_DIAL_PATH; dialFullName += "/"; @@ -233,6 +233,8 @@ namespace OHOS { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UninstallDial the dial %d is ok", ID); + registeredDials.erase(ID); + return true; } WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "uapi_delete_files the dial %d is false", ID); diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c index bc9e427f2..c64a8d524 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -3518,7 +3518,6 @@ static void GetAllDialUidCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *to { printf( "GetAllDialUidCmd yes\r\n"); } - send_big_data(0,dail_uid_buf,data_size,data_size,1,1,0x2a,1); free(dail_uid_buf); @@ -5349,7 +5348,9 @@ static errcode_t install_dial(void) printf("decode %s to %s , ret %X \n",lzma_filepath,dialbin_filepath, ret); - install_Register_dial(lzmapkgname,ble_dial_uid); + char *namebuf= strtok(lzmapkgname,"."); + + install_Register_dial(namebuf,ble_dial_uid); if ( ret == ERRCODE_SUCC) return ERRCODE_SUCC;