From: luozheng <1732036298@qq.com> Date: Sat, 22 Jun 2024 07:46:48 +0000 (+0800) Subject: 显示方式Model文件SetAppListDisplayStyle函数添加错误日志打印 X-Git-Tag: release_V1.2.70_20241020_135402~968 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=cd7221301f5582da4d2bf6c3edd841a9f103e7a6;p=mirrors%2FFD230.git 显示方式Model文件SetAppListDisplayStyle函数添加错误日志打印 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp index 6da8835c8..58ba50568 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/themestyle/src/ThemeStyleModel.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-06-07 09:21:47 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-06-18 14:42:50 + * @LastEditTime: 2024-06-22 15:10:07 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/set_desktop/src/ThemeStyleModel.cpp */ @@ -10,6 +10,7 @@ #include "kv_store.h" #include "securec.h" #include "wearable_log.h" +#include namespace OHOS { static const int STYLE_VALUE_LEN = 32; @@ -49,13 +50,18 @@ namespace OHOS /// @param style 要设置的风格样式 void ThemeStyleModel::SetAppListDisplayStyle(ThemeStyle style) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ThemeStyleModel::SetAppListDisplayStyle"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ThemeStyleModel::SetAppListDisplayStyle,style = %d", style); // 检查是否存在对应的样式选项 if (ThemeStyleMap.find(style) != ThemeStyleMap.end()) { // 根据映射设置显示样式值 - (void)UtilsSetValue(THEMESTYLE_KEY, ThemeStyleMap.at(style).c_str()); + int ret = UtilsSetValue(THEMESTYLE_KEY, ThemeStyleMap.at(style).c_str()); + if (ret != EC_SUCCESS) + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UtilsSetValue error,ret = %d", ret); + return; + } } else { @@ -63,7 +69,7 @@ namespace OHOS } } - //获取选中的样式Id + // 获取选中的样式Id uint16_t ThemeStyleModel::GetSelectThemeStyleId(void) { return GetAppListDisplayStyle(); diff --git a/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp b/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp index 114fc4ba8..311cba0e8 100755 --- a/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp +++ b/code/sdk/application/wearable/nativeabilityfwk/src/Ability.cpp @@ -183,7 +183,7 @@ void Ability::PostChangeSlice(const uint16_t targetSliceId, TransitionType type, void Ability::OnTransitionEnd() { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::OnTransitionEnd"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_LAUNCHER_FWK, "Ability::OnTransitionEnd"); if (!sliceTransition_.IsCurrentSnapshotEnabled()) { if (prevSlice_.slice != nullptr) { prevSlice_.slice->OnStop();