From: 袁清梦 <3449750381@qq.com> Date: Fri, 4 Oct 2024 10:30:12 +0000 (+0000) Subject: Merge #1100 into sdk602patch0626 from refs/changes/1100/head X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=6e19b45697eacaebf83ecf28d01815e435fb3b8b;p=mirrors%2FFD230.git Merge #1100 into sdk602patch0626 from refs/changes/1100/head 调试窗口增加更新接口 * refs/changes/1100/head: (1 commits squashed) - 调试窗口增加更新接口 Signed-off-by: Caisking <3449750381@qq.com> Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1100 --- diff --git a/code/sdk/application/wearable/service/msg_center/include/notify/debug_output_notification/debug_output_notification.h b/code/sdk/application/wearable/service/msg_center/include/notify/debug_output_notification/debug_output_notification.h index 6f9a6e843..df164c7fd 100644 --- a/code/sdk/application/wearable/service/msg_center/include/notify/debug_output_notification/debug_output_notification.h +++ b/code/sdk/application/wearable/service/msg_center/include/notify/debug_output_notification/debug_output_notification.h @@ -32,6 +32,7 @@ namespace OHOS void SetCurViewIndex(int16_t viewNum); int GetCurViewIndex(void); void InitDebugOutputItem(); + void UpdateView(std::string str); std::string get_bt_runtime_status_t(void); std::string get_cat1_runtime_status_t(void); std::string get_runtime_status_t(void); diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp index 134522814..9d3025d41 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp @@ -14,6 +14,32 @@ #include "bluetooth/include/BluetoothModel.h" #include "system/include/SystemLogModel.h" #include "wearable_log.h" +#include "AppViewIDs.h" +#include "NativeAbility.h" +#include "bleEvent.h" +#include "broadcast_feature.h" +#include "broadcast_service.h" +#include "cat1_ctl.h" +#include "cat1_server.h" +#include "custom_runtime.h" +#include "custom_utils.h" +#include "graphic_service.h" +#include "lwip/apps/http_client.h" +#include "samgr_lite.h" +#include "tcxo.h" +#include "thread_adapter.h" +#include "thread_init.h" +#include "vibrator_service.h" +#include "wearable_log.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace OHOS { @@ -257,22 +283,34 @@ namespace OHOS { case 1: str = get_bt_runtime_status_t(); - debugOutputLabel->SetText(str.c_str()); break; case 2: str = get_cat1_runtime_status_t(); - debugOutputLabel->SetText(str.c_str()); break; case 3: str = get_runtime_status_t(); - debugOutputLabel->SetText(str.c_str()); break; case 4: str = get_system_log(); - debugOutputLabel->SetText(str.c_str()); break; default: + str = "--"; break; + } + + // GraphicService::GetInstance()->PostGraphicEvent(std::bind( + // &DebugOutputViewEventListener::UpdateView, DebugOutputViewEventListener::GetInstance(),str)); + + return true; + } + + + //获取视图 + void DebugOutputViewEventListener::UpdateView(std::string str) + { + if(debugOutputLabel != nullptr) + { + debugOutputLabel->SetText(str.c_str()); } if (debugOutputLabelButton) { @@ -280,10 +318,7 @@ namespace OHOS debugOutputLabelButton->Invalidate(); } debugOutputLabel->Invalidate(); - - return true; } - bool DebugOutputViewEventListener::OnDrag(UIView &view, const DragEvent &event) { UNUSED(view);