From cb6846432f8d10b3569e963beff4072906fcacb3 Mon Sep 17 00:00:00 2001 From: qinlong0101 Date: Tue, 7 Jun 2022 11:54:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9codex=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qinlong0101 --- services/screendemo/test.cpp | 4 ++-- .../sourceservice/dscreenmgr/src/screen_manager_adapter.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/services/screendemo/test.cpp b/services/screendemo/test.cpp index 232b64f..5d07cce 100644 --- a/services/screendemo/test.cpp +++ b/services/screendemo/test.cpp @@ -66,7 +66,7 @@ vector> QueryRemoteScreenInfo() } cout << endl; cout << "--------screen id " << screen->GetId() << "---------" << endl; - cout << "screen name: " << screen->GetName() << endl; + cout << "screen name: " << GetAnonyString(screen->GetName()).c_str() << endl; cout << "width: " << screen->GetWidth() << endl; cout << "height: " << screen->GetHeight() << endl; cout << "-------------------------------------------" << endl; @@ -221,7 +221,7 @@ static void PrintNodeProperty(NodeBasicInfo *nodeInfo) } printf("DeviceName = %s\n", nodeInfo->deviceName); - printf("NetworkId = %s\n", nodeInfo->networkId); + printf("NetworkId = %s\n", GetAnonyString(nodeInfo->networkId).c_str()); NodeDeviceInfoKey key = NODE_KEY_UDID; unsigned char udid[UDID_BUF_LEN] = {0}; if (GetNodeKeyInfo(g_pkgName, nodeInfo->networkId, key, udid, UDID_BUF_LEN) != 0) { diff --git a/services/screenservice/sourceservice/dscreenmgr/src/screen_manager_adapter.cpp b/services/screenservice/sourceservice/dscreenmgr/src/screen_manager_adapter.cpp index b3f4c0a..6f23faa 100644 --- a/services/screenservice/sourceservice/dscreenmgr/src/screen_manager_adapter.cpp +++ b/services/screenservice/sourceservice/dscreenmgr/src/screen_manager_adapter.cpp @@ -25,6 +25,7 @@ #include "dscreen_constants.h" #include "dscreen_errcode.h" #include "dscreen_log.h" +#include "dscreen_util.h" namespace OHOS { namespace DistributedHardware { @@ -40,7 +41,7 @@ uint64_t ScreenMgrAdapter::CreateVirtualScreen(const std::string &devId, const s { DHLOGI("CreateVirtualScreen, width: %u, height: %u", videoParam->GetScreenWidth(), videoParam->GetScreenHeight()); - std::string screenName = DSCREEN_PREFIX + SEPERATOR + devId + SEPERATOR + dhId; + std::string screenName = DSCREEN_PREFIX + SEPERATOR + GetAnonyString(devId) + SEPERATOR + GetAnonyString(dhId); auto iter = screenIdMap_.find(screenName); if (iter != screenIdMap_.end()) { DHLOGI("remove an exist virtual screen.");