Format code

Signed-off-by: wuliangdong <wuliangdong1@huawei.com>
Change-Id: Ic6d826354daea344b3271d5fe1461a15d0d026af
This commit is contained in:
wuliangdong 2023-11-11 02:05:34 +00:00
parent e2fed288fb
commit bec8299dc6
6 changed files with 20 additions and 23 deletions

View File

@ -122,7 +122,7 @@ public:
void OnDragEndMessage(const DragNotifyMsg &msg) override
{
FI_HILOGI("DisplayX:%{public}d, displayY:%{public}d, targetPid:%{public}d, result:%{public}d",
msg.displayX, msg.displayY, msg.targetPid, static_cast<int32_t>(msg.result));
msg.displayX, msg.displayY, msg.targetPid, static_cast<int32_t>(msg.result));
if (function_ != nullptr) {
function_(msg);
}

View File

@ -224,7 +224,7 @@ public:
void OnDragEndMessage(const DragNotifyMsg &msg) override
{
FI_HILOGI("DisplayX:%{public}d, displayY:%{public}d, targetPid:%{public}d, result:%{public}d",
msg.displayX, msg.displayY, msg.targetPid, static_cast<int32_t>(msg.result));
msg.displayX, msg.displayY, msg.targetPid, static_cast<int32_t>(msg.result));
if (function_ != nullptr) {
function_(msg);
}
@ -462,11 +462,11 @@ void InteractionManagerTest::PrintDragData(const DragData &dragData)
CALL_DEBUG_ENTER;
for (const auto &shadowInfo : dragData.shadowInfos) {
FI_HILOGD("PixelFormat:%{public}d, PixelAlphaType:%{public}d, PixelAllocatorType:%{public}d,"
" PixelWidth:%{public}d, PixelHeight:%{public}d, shadowX:%{public}d, shadowY:%{public}d",
static_cast<int32_t>(shadowInfo.pixelMap->GetPixelFormat()),
static_cast<int32_t>(shadowInfo.pixelMap->GetAlphaType()),
static_cast<int32_t>(shadowInfo.pixelMap->GetAllocatorType()),
shadowInfo.pixelMap->GetWidth(), shadowInfo.pixelMap->GetHeight(), shadowInfo.x, shadowInfo.y);
" PixelWidth:%{public}d, PixelHeight:%{public}d, shadowX:%{public}d, shadowY:%{public}d",
static_cast<int32_t>(shadowInfo.pixelMap->GetPixelFormat()),
static_cast<int32_t>(shadowInfo.pixelMap->GetAlphaType()),
static_cast<int32_t>(shadowInfo.pixelMap->GetAllocatorType()),
shadowInfo.pixelMap->GetWidth(), shadowInfo.pixelMap->GetHeight(), shadowInfo.x, shadowInfo.y);
}
FI_HILOGD("SourceType:%{public}d, pointerId:%{public}d, displayId:%{public}d, displayX:%{public}d,"

View File

@ -188,6 +188,7 @@ public:
*/
int32_t SetDragWindowVisible(bool visible);
// 这个接口的行为在传入的是多个shadowInfo的时候是不是需要改变
/**
* @brief Obtains the position of the touch point or mouse pointer relative to
* the upper left corner of the shadow thumbnail.
@ -206,6 +207,7 @@ public:
* @return Returns <b>0</b> if the operation is successful; returns other values if the operation fails.
* @since 10
*/
// 这个接口的行为或者接口参数,是不是也需要改变
int32_t UpdateShadowPic(const ShadowInfo &shadowInfo);
/**

View File

@ -110,11 +110,11 @@ void DragManager::PrintDragData(const DragData &dragData)
CALL_INFO_TRACE;
for (const auto& shadowInfo : dragData.shadowInfos) {
FI_HILOGI("PixelFormat:%{public}d, PixelAlphaType:%{public}d, PixelAllocatorType:%{public}d,"
" PixelWidth:%{public}d, PixelHeight:%{public}d, shadowX:%{public}d, shadowY:%{public}d",
static_cast<int32_t>(shadowInfo.pixelMap->GetPixelFormat()),
static_cast<int32_t>(shadowInfo.pixelMap->GetAlphaType()),
static_cast<int32_t>(shadowInfo.pixelMap->GetAllocatorType()),
shadowInfo.pixelMap->GetWidth(), shadowInfo.pixelMap->GetHeight(), shadowInfo.x, shadowInfo.y);
" PixelWidth:%{public}d, PixelHeight:%{public}d, shadowX:%{public}d, shadowY:%{public}d",
static_cast<int32_t>(shadowInfo.pixelMap->GetPixelFormat()),
static_cast<int32_t>(shadowInfo.pixelMap->GetAlphaType()),
static_cast<int32_t>(shadowInfo.pixelMap->GetAllocatorType()),
shadowInfo.pixelMap->GetWidth(), shadowInfo.pixelMap->GetHeight(), shadowInfo.x, shadowInfo.y);
}
std::string summarys;
for (const auto &[udKey, recordSize] : dragData.summarys) {

View File

@ -102,10 +102,9 @@ std::optional<DragData> DragDataManagerTest::CreateDragData(int32_t sourceType,
FI_HILOGE("Create pixelmap failed");
return std::nullopt;
}
DragData dragData;
dragData.shadowInfo.x = 0;
dragData.shadowInfo.y = 0;
dragData.shadowInfo.pixelMap = pixelMap;
dragData.shadowInfos.push_back({ pixelMap, 0, 0 });
dragData.buffer = std::vector<uint8_t>(MAX_BUFFER_SIZE, 0);
dragData.udKey = UD_KEY;
dragData.sourceType = sourceType;
@ -206,9 +205,7 @@ HWTEST_F(DragDataManagerTest, DragDataManagerTest005, TestSize.Level0)
std::shared_ptr<Media::PixelMap> pixelMap = CreatePixelMap(PIXEL_MAP_WIDTH, PIXEL_MAP_HEIGHT);
EXPECT_FALSE(pixelMap == nullptr);
DragData dragData;
dragData.shadowInfo.pixelMap = pixelMap;
dragData.shadowInfo.x = SHADOWINFO_X;
dragData.shadowInfo.y = SHADOWINFO_Y;
dragData.shadowInfos.push_back({ pixelMap, SHADOWINFO_X, SHADOWINFO_Y });
dragData.displayX = DISPLAY_X;
dragData.displayY = DISPLAY_Y;
DRAG_DATA_MGR.Init(dragData);
@ -239,9 +236,7 @@ HWTEST_F(DragDataManagerTest, DragDataManagerTest006, TestSize.Level0)
{
CALL_TEST_DEBUG;
DragData dragData;
dragData.shadowInfo.pixelMap = nullptr;
dragData.shadowInfo.x = SHADOWINFO_X;
dragData.shadowInfo.y = SHADOWINFO_Y;
dragData.shadowInfos.push_back({ nullptr, SHADOWINFO_X, SHADOWINFO_Y });
dragData.displayX = DISPLAY_X;
dragData.displayY = DISPLAY_Y;
DRAG_DATA_MGR.Init(dragData);

View File

@ -31,11 +31,11 @@ config("devicestatus_util_public_config") {
ohos_shared_library("devicestatus_util") {
version_script = "libdevicestatus_util_map"
sources = [
"src/drag_data_packer.cpp",
"src/util.cpp",
"src/util_napi.cpp",
"src/util_napi_error.cpp",
"src/utility.cpp",
"src/drag_data_packer.cpp",
]
configs = [ ":devicestatus_util_private_config" ]
@ -45,8 +45,8 @@ ohos_shared_library("devicestatus_util") {
external_deps = [
"c_utils:utils",
"hilog:libhilog",
"napi:ace_napi",
"image_framework:image_native",
"napi:ace_napi",
]
innerapi_tags = [ "platformsdk" ]