modify to follow rules

Signed-off-by: wuliangdong <wuliangdong1@huawei.com>
Change-Id: I3a90a5d2ad980b7f1a9948bcd9ba81290645c0bf
This commit is contained in:
wuliangdong 2023-01-19 07:05:50 +00:00
parent 74fb89931f
commit 5931a2f138
6 changed files with 7 additions and 17 deletions

View File

@ -27,6 +27,7 @@ using namespace testing::ext;
namespace {
constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, MSDP_DOMAIN_ID, "InteractionManagerTest" };
constexpr int32_t TIME_WAIT_FOR_OP = 100;
const std::vector<uint8_t> DEFAULT_BUFFER = std::vector<uint8_t>(512, 100);
} // namespace
class InteractionManagerTest : public testing::Test {
public:
@ -85,7 +86,7 @@ void SetParam(int32_t width, int32_t height, DragData& dragData)
dragData.pixelMap = ConstructPixmap(width, height);
dragData.x = INT32_MAX;
dragData.y = INT32_MAX;
dragData.buffer = std::vector<uint8_t>(512, 11);
dragData.buffer = DEFAULT_BUFFER;
dragData.sourceType = -1;
}

View File

@ -33,7 +33,7 @@ struct DragData {
int32_t sourceType { -1 };
};
enum class DragState{
enum class DragState {
FREE = 0,
DRAGGING = 1,
};

View File

@ -43,7 +43,8 @@ public:
};
public:
DragManager() {
DragManager()
{
monitorConsumer_ = std::make_shared<MonitorConsumer>(nullptr);
}
~DragManager() = default;

View File

@ -46,7 +46,7 @@ int32_t DragDataAdapter::UpdateDragMessage(const std::u16string &message)
return RET_ERR;
}
const DragData& DragDataAdapter::GetDragData()
const DragData &DragDataAdapter::GetDragData()
{
return dragData_;
}
@ -56,7 +56,7 @@ int32_t DragDataAdapter::GetDragStyle() const
return RET_ERR;
}
const std::u16string & DragDataAdapter::GetDragMessage() const
const std::u16string &DragDataAdapter::GetDragMessage() const
{
return dragMessage_;
}

View File

@ -33,32 +33,26 @@ void DragDrawing::InitPicture(OHOS::Media::PixelMap pixelMap, int32_t x, int32_t
void DragDrawing::Draw(int32_t x, int32_t y)
{
}
void DragDrawing::UpdateDragMessage(uint8_t message[])
{
}
void DragDrawing::UpdateDragStyle(int32_t dragStyle)
{
}
void DragDrawing::DrawMessage()
{
}
void DragDrawing::DrawStyle()
{
}
void DragDrawing::DrawPicture()
{
}
} // namespace DeviceStatus

View File

@ -45,12 +45,6 @@ int32_t DragManager::StartDrag(const DragData &dragData, int32_t pid)
pixelBytes, byteCount, dragData.x, dragData.y);
FI_HILOGD("bufferSize: %{public}d", dragData.buffer.size());
FI_HILOGD("ByteCount of pixelMap: %{public}d", dragData.pixelMap->GetByteCount());
for (const auto& elem : dragData.buffer) {
if (elem != 11) {
FI_HILOGD("%{public}d != 11, parcel wrong ",elem);
return RET_ERR;
}
}
(void) pid;
(void) dragState_;
(void) dragOutPid_;