修复删除表盘BUG 298/2 298/head 299/target/1 300/target/1
authorhcj <1224667075@qq.com>
Mon, 17 Jun 2024 03:02:48 +0000 (11:02 +0800)
committerhcj <1224667075@qq.com>
Mon, 17 Jun 2024 03:02:48 +0000 (11:02 +0800)
code/sdk/application/wearable/fd230app/nativeui/set_dial/src/SetDialModel.cpp
code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c

index 2aba534..c0dfabf 100644 (file)
@@ -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);
index bc9e427..c64a8d5 100644 (file)
@@ -3518,7 +3518,6 @@ static void GetAllDialUidCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *to
         {\r
             printf( "GetAllDialUidCmd yes\r\n");\r
         }\r
-\r
         send_big_data(0,dail_uid_buf,data_size,data_size,1,1,0x2a,1);\r
         free(dail_uid_buf);\r
         \r
@@ -5349,7 +5348,9 @@ static errcode_t install_dial(void)
 \r
         printf("decode %s to %s , ret %X \n",lzma_filepath,dialbin_filepath, ret);\r
 \r
-        install_Register_dial(lzmapkgname,ble_dial_uid);\r
+        char *namebuf= strtok(lzmapkgname,".");\r
+\r
+        install_Register_dial(namebuf,ble_dial_uid);\r
 \r
         if ( ret == ERRCODE_SUCC)\r
             return ERRCODE_SUCC;\r