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.");