diff --git a/dm/src/screen.cpp b/dm/src/screen.cpp index 1e967b50..8fb8c559 100644 --- a/dm/src/screen.cpp +++ b/dm/src/screen.cpp @@ -21,7 +21,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "Screen"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "Screen"}; } class Screen::Impl : public RefBase { public: diff --git a/dm/src/screen_group.cpp b/dm/src/screen_group.cpp index 048b3d64..815dc625 100644 --- a/dm/src/screen_group.cpp +++ b/dm/src/screen_group.cpp @@ -22,7 +22,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "ScreenGroup"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenGroup"}; } class ScreenGroup::Impl : public RefBase { public: diff --git a/dm/test/systemtest/display_change_test.cpp b/dm/test/systemtest/display_change_test.cpp index 3fbc2779..12a8dbcc 100644 --- a/dm/test/systemtest/display_change_test.cpp +++ b/dm/test/systemtest/display_change_test.cpp @@ -27,7 +27,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayChangeTest"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayChangeTest"}; constexpr uint32_t MAX_TIME_WAITING_FOR_CALLBACK = 20; constexpr uint32_t SLEEP_TIME_IN_US = 10000; // 10ms constexpr uint32_t SPLIT_TEST_SLEEP_S = 2; diff --git a/dm/test/unittest/display_change_unit_test.cpp b/dm/test/unittest/display_change_unit_test.cpp index 53e13901..8c5ef836 100644 --- a/dm/test/unittest/display_change_unit_test.cpp +++ b/dm/test/unittest/display_change_unit_test.cpp @@ -28,7 +28,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { -constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayChangeUnitTest"}; +constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayChangeUnitTest"}; using Mocker = SingletonMocker; class DisplayChangeEventListener : public DisplayManager::IDisplayListener { diff --git a/dmserver/src/abstract_display_controller.cpp b/dmserver/src/abstract_display_controller.cpp index 86abf0f6..9faf9cfd 100644 --- a/dmserver/src/abstract_display_controller.cpp +++ b/dmserver/src/abstract_display_controller.cpp @@ -466,7 +466,8 @@ void AbstractDisplayController::BindAloneScreenLocked(sptr realA } else { WLOGI("bind display for new screen. screen:%{public}" PRIu64", display:%{public}" PRIu64"", realAbsScreen->dmsId_, dummyDisplay_->GetId()); - bool updateFlag = dummyDisplay_->GetHeight() == info->height_ && dummyDisplay_->GetWidth() == info->width_; + bool updateFlag = static_cast(dummyDisplay_->GetHeight()) == info->height_ + && static_cast(dummyDisplay_->GetWidth()) == info->width_; dummyDisplay_->BindAbstractScreen(abstractScreenController_->GetAbstractScreen(realAbsScreen->dmsId_)); if (updateFlag) { DisplayManagerAgentController::GetInstance().OnDisplayCreate(dummyDisplay_->ConvertToDisplayInfo()); diff --git a/dmserver/src/display_manager_config.cpp b/dmserver/src/display_manager_config.cpp index e54ad249..a64ada09 100644 --- a/dmserver/src/display_manager_config.cpp +++ b/dmserver/src/display_manager_config.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "DisplayManagerConfig"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerConfig"}; } std::map> DisplayManagerConfig::intNumbersConfig_; diff --git a/interfaces/kits/napi/display_runtime/js_display.cpp b/interfaces/kits/napi/display_runtime/js_display.cpp index 48f20aae..405303b6 100644 --- a/interfaces/kits/napi/display_runtime/js_display.cpp +++ b/interfaces/kits/napi/display_runtime/js_display.cpp @@ -25,7 +25,7 @@ namespace OHOS { namespace Rosen { using namespace AbilityRuntime; namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsDisplay"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplay"}; } static thread_local std::map> g_JsDisplayMap; diff --git a/interfaces/kits/napi/display_runtime/js_display_listener.cpp b/interfaces/kits/napi/display_runtime/js_display_listener.cpp index eac74115..98e74436 100644 --- a/interfaces/kits/napi/display_runtime/js_display_listener.cpp +++ b/interfaces/kits/napi/display_runtime/js_display_listener.cpp @@ -19,7 +19,7 @@ namespace OHOS { namespace Rosen { using namespace AbilityRuntime; namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsDisplayListener"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplayListener"}; } void JsDisplayListener::AddCallback(const std::string& type, NativeValue* jsListenerObject) diff --git a/interfaces/kits/napi/display_runtime/js_display_manager.cpp b/interfaces/kits/napi/display_runtime/js_display_manager.cpp index b4c113ec..47f02c1f 100644 --- a/interfaces/kits/napi/display_runtime/js_display_manager.cpp +++ b/interfaces/kits/napi/display_runtime/js_display_manager.cpp @@ -32,7 +32,7 @@ constexpr size_t ARGC_ONE = 1; constexpr size_t ARGC_TWO = 2; constexpr int32_t INDEX_ONE = 1; namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsDisplayManager"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplayManager"}; } class JsDisplayManager { diff --git a/interfaces/kits/napi/screen_runtime/napi/js_screen.cpp b/interfaces/kits/napi/screen_runtime/napi/js_screen.cpp index 46ee2cac..cd6a6d4d 100644 --- a/interfaces/kits/napi/screen_runtime/napi/js_screen.cpp +++ b/interfaces/kits/napi/screen_runtime/napi/js_screen.cpp @@ -26,7 +26,7 @@ using namespace AbilityRuntime; constexpr size_t ARGC_ONE = 1; constexpr size_t ARGC_TWO = 2; namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsScreen"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsScreen"}; } static thread_local std::map> g_JsScreenMap; diff --git a/utils/include/future.h b/utils/include/future.h index 6b51f890..a216513d 100644 --- a/utils/include/future.h +++ b/utils/include/future.h @@ -17,11 +17,12 @@ #define OHOS_WM_INCLUDE_FUTURE_H #include "hilog/log.h" +#include "window_manager_hilog.h" namespace OHOS::Rosen { template class Future { - constexpr static HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "Future"}; + constexpr static HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "Future"}; public: T GetResult(long timeOut) { diff --git a/wmserver/src/window_node.cpp b/wmserver/src/window_node.cpp index 5fb8d7c9..97dec952 100644 --- a/wmserver/src/window_node.cpp +++ b/wmserver/src/window_node.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowNode"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowNode"}; } WindowNode::~WindowNode()