mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-11-27 17:51:04 +00:00
commit
0ee3bf7ba1
@ -288,7 +288,6 @@ int32_t DeviceStatusSrvStub::GetCoordinationStateStub(MessageParcel& data, Messa
|
||||
|
||||
int32_t DeviceStatusSrvStub::UpdateDragStyleStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
int32_t style = 0;
|
||||
READINT32(data, style, E_DEVICESTATUS_READ_PARCEL_ERROR);
|
||||
int32_t ret = UpdateDragStyle(static_cast<DragCursorStyle>(style));
|
||||
@ -300,7 +299,6 @@ int32_t DeviceStatusSrvStub::UpdateDragStyleStub(MessageParcel& data, MessagePar
|
||||
|
||||
int32_t DeviceStatusSrvStub::GetDragTargetPidStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
int32_t pid = GetDragTargetPid();
|
||||
WRITEINT32(reply, pid, IPC_STUB_WRITE_PARCEL_ERR);
|
||||
return RET_OK;
|
||||
@ -308,7 +306,6 @@ int32_t DeviceStatusSrvStub::GetDragTargetPidStub(MessageParcel& data, MessagePa
|
||||
|
||||
int32_t DeviceStatusSrvStub::GetUdKeyStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
std::string udKey;
|
||||
int32_t ret = GetUdKey(udKey);
|
||||
if (ret != RET_OK) {
|
||||
@ -363,7 +360,6 @@ int32_t DeviceStatusSrvStub::HandleAllocSocketFdStub(MessageParcel& data, Messag
|
||||
|
||||
int32_t DeviceStatusSrvStub::StartDragStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
auto pixelMap = OHOS::Media::PixelMap::Unmarshalling(data);
|
||||
CHKPR(pixelMap, RET_ERR);
|
||||
DragData dragData;
|
||||
@ -409,7 +405,6 @@ int32_t DeviceStatusSrvStub::StartDragStub(MessageParcel& data, MessageParcel& r
|
||||
|
||||
int32_t DeviceStatusSrvStub::StopDragStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
int32_t result = 0;
|
||||
READINT32(data, result, E_DEVICESTATUS_READ_PARCEL_ERROR);
|
||||
if ((result < static_cast<int32_t>(DragResult::DRAG_SUCCESS)) ||
|
||||
@ -435,7 +430,6 @@ int32_t DeviceStatusSrvStub::StopDragStub(MessageParcel& data, MessageParcel& re
|
||||
|
||||
int32_t DeviceStatusSrvStub::AddDraglistenerStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
int32_t ret = AddDraglistener();
|
||||
if (ret != RET_OK) {
|
||||
FI_HILOGE("Call AddDraglistener failed, ret:%{public}d", ret);
|
||||
@ -445,7 +439,6 @@ int32_t DeviceStatusSrvStub::AddDraglistenerStub(MessageParcel& data, MessagePar
|
||||
|
||||
int32_t DeviceStatusSrvStub::RemoveDraglistenerStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
int32_t ret = RemoveDraglistener();
|
||||
if (ret != RET_OK) {
|
||||
FI_HILOGE("Call RemoveDraglistener failed, ret:%{public}d", ret);
|
||||
@ -455,7 +448,6 @@ int32_t DeviceStatusSrvStub::RemoveDraglistenerStub(MessageParcel& data, Message
|
||||
|
||||
int32_t DeviceStatusSrvStub::AddSubscriptListenerStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
int32_t ret = AddSubscriptListener();
|
||||
if (ret != RET_OK) {
|
||||
FI_HILOGE("Call AddSubscriptListener failed, ret:%{public}d", ret);
|
||||
@ -465,7 +457,6 @@ int32_t DeviceStatusSrvStub::AddSubscriptListenerStub(MessageParcel& data, Messa
|
||||
|
||||
int32_t DeviceStatusSrvStub::RemoveSubscriptListenerStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
int32_t ret = RemoveSubscriptListener();
|
||||
if (ret != RET_OK) {
|
||||
FI_HILOGE("Call RemoveSubscriptListener failed, ret:%{public}d", ret);
|
||||
@ -475,7 +466,6 @@ int32_t DeviceStatusSrvStub::RemoveSubscriptListenerStub(MessageParcel& data, Me
|
||||
|
||||
int32_t DeviceStatusSrvStub::SetDragWindowVisibleStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
bool visible = false;
|
||||
READBOOL(data, visible, E_DEVICESTATUS_READ_PARCEL_ERROR);
|
||||
int32_t ret = SetDragWindowVisible(visible);
|
||||
@ -487,7 +477,6 @@ int32_t DeviceStatusSrvStub::SetDragWindowVisibleStub(MessageParcel& data, Messa
|
||||
|
||||
int32_t DeviceStatusSrvStub::GetShadowOffsetStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
int32_t offsetX = 0;
|
||||
int32_t offsetY = 0;
|
||||
int32_t width = 0;
|
||||
@ -505,7 +494,6 @@ int32_t DeviceStatusSrvStub::GetShadowOffsetStub(MessageParcel& data, MessagePar
|
||||
|
||||
int32_t DeviceStatusSrvStub::UpdateShadowPicStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
auto pixelMap = Media::PixelMap::Unmarshalling(data);
|
||||
CHKPR(pixelMap, RET_ERR);
|
||||
ShadowInfo shadowInfo;
|
||||
@ -528,7 +516,6 @@ int32_t DeviceStatusSrvStub::UpdateShadowPicStub(MessageParcel& data, MessagePar
|
||||
|
||||
int32_t DeviceStatusSrvStub::GetDragDataStub(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
DragData dragData;
|
||||
int32_t ret = GetDragData(dragData);
|
||||
WRITEINT32(reply, ret, IPC_STUB_WRITE_PARCEL_ERR);
|
||||
@ -576,7 +563,6 @@ int32_t DeviceStatusSrvStub::AddHotAreaListenerStub(MessageParcel& data, Message
|
||||
|
||||
int32_t DeviceStatusSrvStub::GetDragStateStub(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
DragState dragState;
|
||||
int32_t ret = GetDragState(dragState);
|
||||
if (ret != RET_OK) {
|
||||
|
@ -30,7 +30,6 @@ constexpr OHOS::HiviewDFX::HiLogLabel LABEL { LOG_CORE, MSDP_DOMAIN_ID, "Delegat
|
||||
|
||||
void DelegateTasks::Task::ProcessTask()
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
if (hasWaited_) {
|
||||
FI_HILOGE("Expired task will be discarded, id:%{public}d", id_);
|
||||
return;
|
||||
|
@ -34,7 +34,6 @@ DragDataManager::~DragDataManager() = default;
|
||||
|
||||
void DragDataManager::Init(const DragData &dragData)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
dragData_ = dragData;
|
||||
if (dragData.displayId < DEFAULT_DISPLAY_ID) {
|
||||
dragData_.displayId = DEFAULT_DISPLAY_ID;
|
||||
|
@ -145,7 +145,6 @@ bool CheckNodesValid()
|
||||
|
||||
float GetScaling()
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
if (g_drawingInfo.isExistScalingVallue) {
|
||||
FI_HILOGD("deviceDpi:%{public}f", g_drawingInfo.scalingValue);
|
||||
return g_drawingInfo.scalingValue;
|
||||
@ -219,7 +218,6 @@ int32_t DragDrawing::Init(const DragData &dragData)
|
||||
|
||||
int32_t DragDrawing::CheckDragData(const DragData &dragData)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
if (g_drawingInfo.isRunning) {
|
||||
FI_HILOGE("Drag drawing is running, can not init again");
|
||||
return INIT_CANCEL;
|
||||
@ -239,7 +237,6 @@ int32_t DragDrawing::CheckDragData(const DragData &dragData)
|
||||
|
||||
void DragDrawing::Draw(int32_t displayId, int32_t displayX, int32_t displayY)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
if (displayId < 0) {
|
||||
FI_HILOGE("Invalid displayId:%{public}d", displayId);
|
||||
return;
|
||||
@ -269,7 +266,6 @@ void DragDrawing::Draw(int32_t displayId, int32_t displayX, int32_t displayY)
|
||||
|
||||
int32_t DragDrawing::UpdateDragStyle(DragCursorStyle style)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
FI_HILOGD("style:%{public}d", style);
|
||||
if ((style < DragCursorStyle::DEFAULT) || (style > DragCursorStyle::MOVE)) {
|
||||
FI_HILOGE("Invalid style:%{public}d", style);
|
||||
@ -440,7 +436,6 @@ void DragDrawing::UpdateDrawingState()
|
||||
|
||||
void DragDrawing::UpdateDragWindowState(bool visible)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
CHKPV(g_drawingInfo.surfaceNode);
|
||||
if (visible) {
|
||||
g_drawingInfo.surfaceNode->SetVisible(true);
|
||||
@ -745,7 +740,6 @@ void DragDrawing::OnVsync()
|
||||
|
||||
void DragDrawing::InitDrawingInfo(const DragData &dragData)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
g_drawingInfo.isRunning = true;
|
||||
g_drawingInfo.currentDragNum = dragData.dragNum;
|
||||
g_drawingInfo.sourceType = dragData.sourceType;
|
||||
@ -761,7 +755,6 @@ void DragDrawing::InitDrawingInfo(const DragData &dragData)
|
||||
|
||||
int32_t DragDrawing::InitDragAnimationData(DragAnimationData &dragAnimationData)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
CHKPR(g_drawingInfo.pixelMap, RET_ERR);
|
||||
dragAnimationData.pixelMap = g_drawingInfo.pixelMap;
|
||||
dragAnimationData.displayX = g_drawingInfo.displayX;
|
||||
@ -1136,7 +1129,6 @@ void DragDrawing::SetDecodeOptions(Media::DecodeOptions &decodeOpts)
|
||||
|
||||
bool DragDrawing::ParserFilterInfo(FilterInfo& filterInfo)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
if (g_drawingInfo.filterInfo.empty()) {
|
||||
FI_HILOGD("FilterInfo is empty");
|
||||
return false;
|
||||
|
@ -197,7 +197,6 @@ int32_t DragManager::GetUdKey(std::string &udKey) const
|
||||
|
||||
int32_t DragManager::UpdateDragStyle(DragCursorStyle style, int32_t targetPid, int32_t targetTid)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
if (dragState_ != DragState::START) {
|
||||
FI_HILOGE("No drag instance running, can not update drag style");
|
||||
return RET_ERR;
|
||||
@ -276,7 +275,6 @@ int32_t DragManager::NotifyDragResult(DragResult result)
|
||||
|
||||
void DragManager::DragCallback(std::shared_ptr<MMI::PointerEvent> pointerEvent)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
CHKPV(pointerEvent);
|
||||
int32_t pointerAction = pointerEvent->GetPointerAction();
|
||||
if (pointerAction == MMI::PointerEvent::POINTER_ACTION_PULL_MOVE) {
|
||||
@ -287,13 +285,12 @@ void DragManager::DragCallback(std::shared_ptr<MMI::PointerEvent> pointerEvent)
|
||||
OnDragUp(pointerEvent);
|
||||
return;
|
||||
}
|
||||
FI_HILOGD("Unknow action, sourceType:%{public}d, pointerId:%{public}d, pointerAction:%{public}d",
|
||||
FI_HILOGW("Unknow action, sourceType:%{public}d, pointerId:%{public}d, pointerAction:%{public}d",
|
||||
pointerEvent->GetSourceType(), pointerEvent->GetPointerId(), pointerAction);
|
||||
}
|
||||
|
||||
void DragManager::OnDragMove(std::shared_ptr<MMI::PointerEvent> pointerEvent)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
CHKPV(pointerEvent);
|
||||
MMI::PointerEvent::PointerItem pointerItem;
|
||||
pointerEvent->GetPointerItem(pointerEvent->GetPointerId(), pointerItem);
|
||||
@ -310,7 +307,6 @@ void DragManager::SendDragData(int32_t targetTid, const std::string &udKey)
|
||||
option.key = udKey;
|
||||
UDMF::Privilege privilege;
|
||||
privilege.tokenId = static_cast<uint32_t>(targetTid);
|
||||
FI_HILOGD("AddPrivilege enter");
|
||||
int32_t ret = UDMF::UdmfClient::GetInstance().AddPrivilege(option, privilege);
|
||||
if (ret != RET_OK) {
|
||||
FI_HILOGE("Failed to send pid to Udmf client");
|
||||
@ -321,8 +317,6 @@ void DragManager::OnDragUp(std::shared_ptr<MMI::PointerEvent> pointerEvent)
|
||||
{
|
||||
CALL_INFO_TRACE;
|
||||
CHKPV(pointerEvent);
|
||||
FI_HILOGD("SourceType:%{public}d, pointerId:%{public}d",
|
||||
pointerEvent->GetSourceType(), pointerEvent->GetPointerId());
|
||||
DragData dragData = DRAG_DATA_MGR.GetDragData();
|
||||
if (dragData.sourceType == MMI::PointerEvent::SOURCE_TYPE_MOUSE) {
|
||||
dragDrawing_.EraseMouseIcon();
|
||||
@ -330,7 +324,8 @@ void DragManager::OnDragUp(std::shared_ptr<MMI::PointerEvent> pointerEvent)
|
||||
MMI::InputManager::GetInstance()->SetPointerVisible(true);
|
||||
}
|
||||
int32_t targetTid = DRAG_DATA_MGR.GetTargetTid();
|
||||
FI_HILOGD("Target window drag tid:%{public}d", targetTid);
|
||||
FI_HILOGD("SourceType:%{public}d, pointerId:%{public}d,Target window drag tid:%{public}d",
|
||||
targetTid, pointerEvent->GetSourceType(), pointerEvent->GetPointerId());
|
||||
SendDragData(targetTid, dragData.udKey);
|
||||
CHKPV(context_);
|
||||
int32_t repeatCount = 1;
|
||||
@ -346,12 +341,10 @@ void DragManager::OnDragUp(std::shared_ptr<MMI::PointerEvent> pointerEvent)
|
||||
#ifdef OHOS_DRAG_ENABLE_INTERCEPTOR
|
||||
void DragManager::InterceptorConsumer::OnInputEvent(std::shared_ptr<MMI::KeyEvent> keyEvent) const
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
}
|
||||
|
||||
void DragManager::InterceptorConsumer::OnInputEvent(std::shared_ptr<MMI::PointerEvent> pointerEvent) const
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
CHKPV(pointerEvent);
|
||||
if (g_startFilterTime > 0) {
|
||||
auto actionTime = pointerEvent->GetActionTime();
|
||||
@ -383,7 +376,6 @@ void DragManager::InterceptorConsumer::OnInputEvent(std::shared_ptr<MMI::Pointer
|
||||
|
||||
void DragManager::InterceptorConsumer::OnInputEvent(std::shared_ptr<MMI::AxisEvent> axisEvent) const
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
}
|
||||
#endif // OHOS_DRAG_ENABLE_INTERCEPTOR
|
||||
|
||||
@ -413,7 +405,6 @@ void DragManager::MonitorConsumer::OnInputEvent(std::shared_ptr<MMI::AxisEvent>
|
||||
|
||||
void DragManager::Dump(int32_t fd) const
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
DragCursorStyle style = DRAG_DATA_MGR.GetDragStyle();
|
||||
int32_t targetTid = DRAG_DATA_MGR.GetTargetTid();
|
||||
dprintf(fd, "Drag information:\n");
|
||||
@ -501,7 +492,6 @@ std::string DragManager::GetDragCursorStyle(DragCursorStyle value) const
|
||||
|
||||
MMI::ExtraData DragManager::CreateExtraData(bool appended)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
DragData dragData = DRAG_DATA_MGR.GetDragData();
|
||||
MMI::ExtraData extraData;
|
||||
extraData.buffer = dragData.buffer;
|
||||
@ -654,7 +644,6 @@ int32_t DragManager::OnStartDrag()
|
||||
|
||||
int32_t DragManager::OnStopDrag(DragResult result, bool hasCustomAnimation)
|
||||
{
|
||||
CALL_INFO_TRACE;
|
||||
FI_HILOGI("Add custom animation:%{public}s", hasCustomAnimation ? "true" : "false");
|
||||
if (RemovePointerEventHandler() != RET_OK) {
|
||||
FI_HILOGE("Failed to remove pointer event handler");
|
||||
@ -735,7 +724,6 @@ void DragManager::SetDragState(DragState state)
|
||||
|
||||
DragResult DragManager::GetDragResult() const
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
return dragResult_;
|
||||
}
|
||||
|
||||
@ -802,7 +790,6 @@ void DragManager::SetPointerEventFilterTime(int64_t filterTime)
|
||||
|
||||
void DragManager::MoveTo(int32_t x, int32_t y)
|
||||
{
|
||||
CALL_INFO_TRACE;
|
||||
if (dragState_ != DragState::START && dragState_ != DragState::MOTION_DRAGGING) {
|
||||
FI_HILOGE("Drag instance not running");
|
||||
return;
|
||||
|
@ -29,7 +29,6 @@ template void StateChangeNotify::OnDragInfoNotify<DragCursorStyle>(SessionPtr se
|
||||
|
||||
void StateChangeNotify::AddNotifyMsg(std::shared_ptr<MessageInfo> info)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
CHKPV(info);
|
||||
auto it = std::find_if(msgInfos_[info->msgType].begin(), msgInfos_[info->msgType].end(),
|
||||
[info] (auto msgInfo) {
|
||||
@ -44,7 +43,6 @@ void StateChangeNotify::AddNotifyMsg(std::shared_ptr<MessageInfo> info)
|
||||
|
||||
void StateChangeNotify::RemoveNotifyMsg(std::shared_ptr<MessageInfo> info)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
if (msgInfos_[info->msgType].empty() || info == nullptr) {
|
||||
FI_HILOGE("Remove listener failed");
|
||||
return;
|
||||
@ -60,7 +58,6 @@ void StateChangeNotify::RemoveNotifyMsg(std::shared_ptr<MessageInfo> info)
|
||||
|
||||
int32_t StateChangeNotify::StyleChangedNotify(DragCursorStyle style)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
if (msgInfos_[MessageType::NOTIFY_STYLE].empty()) {
|
||||
FI_HILOGW("No listener, send message failed");
|
||||
return RET_ERR;
|
||||
|
Loading…
Reference in New Issue
Block a user