屏蔽错误弹窗提示不做显示
authorluozheng <1732036298@qq.com>
Sun, 2 Nov 2025 07:47:23 +0000 (15:47 +0800)
committerluozheng <1732036298@qq.com>
Sun, 2 Nov 2025 07:47:23 +0000 (15:47 +0800)
code/sdk/application/wearable/ln/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp
code/sdk/zhihui/leiniao/imsl_ln/leiniao_api_at.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_device_info.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_emoji.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_timeline_activities.c
code/sdk/zhihui/leiniao/ln_api_cpp/ln_api_interface.cpp

index 177fbfa..10426f1 100644 (file)
@@ -12,7 +12,7 @@
 #include "events/key_event.h"
 #include "common/key_code.h"
 #include "dock/input_device.h"
-
+#include <ConfigModel.h>
 /* 避免依赖深路径头文件:声明所需 C 接口,保持 C 链接名 */
 #ifdef __cplusplus
 extern "C"
@@ -20,6 +20,7 @@ extern "C"
 #endif
 #include "ln_api.h"
 #include <ConfigModelC.h>
+
     char *uapi_ln_get_device_id(void);
     char *uapi_ln_get_device_iccid(void);
     char *uapi_ln_get_device_model(void);
@@ -163,7 +164,8 @@ namespace OHOS
         uapi_get_buildversion((uint8_t *)version_buf, version_len);
         deviceInfo += "设备version:" + std::string(version_buf) + "\n";
 
-        deviceInfo += "设备model:" + std::string(uapi_ln_get_device_model()) + "\n";
+        // deviceInfo += "设备model:" + std::string(uapi_ln_get_device_model()) + "\n";
+        deviceInfo += "cat1 model:" + ConfigModel::GetInstance()->GetmoderVer() + "\n";
 
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "设备连接状态:%d", ln_ws_get_connection_state());
         switch ((int)ln_ws_get_connection_state()) {
index 8a78fc1..0cca82e 100644 (file)
@@ -1401,7 +1401,6 @@ static uint32_t ln_api_error_at(uint8_t *para, uint32_t paraLen, char *strCommon
         return ERRCODE_FAIL;
     }
 
-    push_api_error_notification(message);
     printf("+LN_API_ERROR: OK\n");
     printf("[LN][API_ERROR] message=%s\n", message);
     return ERRCODE_SUCC;
index 50ce014..f43bfb2 100644 (file)
@@ -175,8 +175,6 @@ void ln_parse_character_config_startUp(const char *json_buf, int json_len)
     {
         printf("[DEVICE_CHARACTER] server error: %s\n", cJSON_IsString(errorCode) ? errorCode->valuestring : "unknown");
         printf("[DEVICE_CHARACTER] server message: %s\n", cJSON_IsString(message) ? message->valuestring : "unknown");
-        // 推送协议错误通知到UI
-        push_api_error_notification(cJSON_IsString(message) ? message->valuestring : "unknown");
         cJSON_Delete(root);
         free(text);
         return;
@@ -338,8 +336,6 @@ void ln_parse_character_config(const char *json_buf, int json_len)
     {
         printf("[DEVICE_CHARACTER] server error: %s\n", cJSON_IsString(errorCode) ? errorCode->valuestring : "unknown");
         printf("[DEVICE_CHARACTER] server message: %s\n", cJSON_IsString(message) ? message->valuestring : "unknown");
-        // 推送协议错误通知到UI
-        push_api_error_notification(cJSON_IsString(message) ? message->valuestring : "unknown");
         cJSON_Delete(root);
         free(text);
         return;
@@ -613,7 +609,6 @@ uint32_t ln_device_get_user_id_http(const char *device_id,
                     // 推送协议错误通知到UI
                     printf("device getUserId: errorCode=%s\n", errorCode->valuestring);
                     printf("device getUserId: message=%s\n", message->valuestring);
-                    push_api_error_notification(message->valuestring);
                 }
                 else
                 {
@@ -749,8 +744,6 @@ uint32_t ln_device_get_chat_stamina_http(const char *device_id, const char *devi
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[CHAT_STAMINA] server error: %s, msg=%s",
                       cJSON_IsString(errorCode) ? errorCode->valuestring : "<unknown>",
                       (message && cJSON_IsString(message)) ? message->valuestring : "<none>");
-        /* 推送协议错误到UI */
-        push_api_error_notification((message && cJSON_IsString(message)) ? message->valuestring : "<none>");
 
         cJSON_Delete(root);
         free(json_text);
index b2f4146..5bc2f6a 100644 (file)
@@ -452,8 +452,15 @@ static void ln_emoji_download(void *arg)
         if (can_download_file(EMOJI_CACHE_BASE_PATH, pkg->totalSize) == 0)
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD] 没有足够的空间,跳过下载");
-            //通知ui
-            push_api_error_notification("没有足够的空间,跳过下载");
+            //上报表情下载失败
+            ln_emoji_report_mail_t mail = {0};
+            ln_safe_strcpy(mail.characterId, sizeof(mail.characterId), g_emoji_package.characterId);
+            ln_safe_strcpy(mail.eyesColor, sizeof(mail.eyesColor), g_emoji_package.eyesColor);
+            ln_safe_strcpy(mail.eyesShape, sizeof(mail.eyesShape), g_emoji_package.eyesShape);
+            ln_safe_strcpy(mail.status, sizeof(mail.status), "download_fail");
+            ln_safe_strcpy(mail.description, sizeof(mail.description), "没有足够的空间,跳过下载");
+            do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_EMOJI_REPORT, (char *)&mail, (uint32_t)sizeof(mail));
+            push_download_fail_notification(DOWNLOAD_FILE_TYPE_EMOJI);
             ln_free_emoji_list();
             return;
         }
@@ -674,7 +681,6 @@ void ln_parse_download_emoji(const char *json_buf, int json_len)
     if(uapi_ln_is_file_downloading() == 1)
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD_EMOJI] 已有文件正在下载中,跳过下载");
-        // push_api_error_notification("已有文件正在下载中,跳过下载");
         return;
     }
 
index 286758f..d6b125b 100644 (file)
@@ -32,7 +32,6 @@ static void ln_parse_timeline_status_and_notify(const char *json_buf, int json_l
                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TIMELINE] getStatus error: %s", err);
                const char *msg = cJSON_IsString(message) ? message->valuestring : "unknown";
                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[TIMELINE] getStatus message: %s", msg);
-               push_api_error_notification(msg);
                cJSON_Delete(root);
                return;
        }
index 727ee99..3519492 100644 (file)
@@ -214,9 +214,9 @@ bool switch_expression_video(const char *video_path)
 // 推送协议错误通知到UI
 void push_api_error_notification(const char *message)
 {
-    const char *msg = message ? message : "";
-    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[API_ERROR] msg=%s", msg);
-    SendMsgToUIService(HAND_API_ERROR_NOTIFY, 0, (void *)msg, (int32_t)strlen(msg));
+    // const char *msg = message ? message : "";
+    // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[API_ERROR] msg=%s", msg);
+    // SendMsgToUIService(HAND_API_ERROR_NOTIFY, 0, (void *)msg, (int32_t)strlen(msg));
 }
 
 // 推送绑定和解绑通知到UI