修改debug界面runtime日志保存开关
authorhcj <1224667075@qq.com>
Tue, 17 Dec 2024 09:14:51 +0000 (17:14 +0800)
committerhcj <1224667075@qq.com>
Tue, 17 Dec 2024 09:14:51 +0000 (17:14 +0800)
code/sdk/application/wearable/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp

index 0ec8a7d..3ebd85f 100644 (file)
@@ -753,6 +753,7 @@ namespace OHOS
     bool DebugOutputViewEventListener::OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event)
     {
         std::string viewId = view.GetViewId();
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"viewId %s",viewId.c_str());
         int viewIndex;
         std::string str;
         if (viewId == DEBUGOUTPUTBLESERVICELABELBUTTON) // 开启ble广播
@@ -821,14 +822,15 @@ namespace OHOS
           }
             return true; //进行UI刷新
         }
-         else if (viewId == "runtime_log_is_save") 
+        else if (viewId == "runtime_log_is_save") 
         {
           if (toggleButtonOffline) {
             if (toggleButtonOffline->GetState() == false) {
-                set_save_runtime_log_switch(1);
+                set_save_runtime_log_switch(0);
+
             }
             else {
-                set_save_runtime_log_switch(0);
+                set_save_runtime_log_switch(1);
             }
           } else {
              WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"组件不存在");