mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-11-23 15:40:16 +00:00
Signed-off-by: pengyanggit yangpeng177@huawei.com
Signed-off-by: pengyanggit <yangpeng177@huawei.com> Change-Id: I703b9a753c18a4bf2a2343dc8c567de4c9fc1105
This commit is contained in:
parent
ad8032a9f7
commit
4ba98c855a
@ -69,7 +69,6 @@ public:
|
||||
napi_deferred deferred { nullptr };
|
||||
CallbackData data;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
static void DeletePtr(T &ptr)
|
||||
{
|
||||
|
@ -798,7 +798,6 @@ void JsEventTarget::EmitMouseLocationEvent(uv_work_t *work, int32_t status)
|
||||
FI_HILOGE("Emit mouse location event, check data is nullptr");
|
||||
return;
|
||||
}
|
||||
|
||||
sptr<JsUtil::MouseCallbackInfo> temp(static_cast<JsUtil::MouseCallbackInfo *>(work->data));
|
||||
JsUtil::DeletePtr<uv_work_t*>(work);
|
||||
temp->DecStrongRef(nullptr);
|
||||
|
@ -56,13 +56,11 @@ public:
|
||||
static std::string GetLocalNetworkId();
|
||||
};
|
||||
|
||||
|
||||
void MouseLocationListenerTest::SetUpTestCase() {}
|
||||
|
||||
void MouseLocationListenerTest::SetUp()
|
||||
{
|
||||
const int32_t permsNum = 3;
|
||||
|
||||
const char *perms[] = {DM_SERVICE_ACCESS_NEWPERMISSION.c_str(), DM_SERVICE_ACCESS_PERMISSION.c_str(),
|
||||
COOPERATE_ACCESS_PERMISSION.c_str()};
|
||||
NativeTokenInfoParams infoInstance = {
|
||||
|
@ -31,7 +31,6 @@
|
||||
namespace OHOS {
|
||||
namespace Msdp {
|
||||
namespace DeviceStatus {
|
||||
|
||||
namespace {
|
||||
const std::string THREAD_NAME { "os_ClientEventHandler" };
|
||||
} // namespace
|
||||
|
@ -33,7 +33,6 @@ namespace Msdp {
|
||||
namespace DeviceStatus {
|
||||
namespace Cooperate {
|
||||
namespace {
|
||||
const std::string COOPERATE_SWITCH { "currentStatus" };
|
||||
const std::string THREAD_NAME { "os_Cooperate_EventHandler" };
|
||||
constexpr double PERCENT { 100.0 };
|
||||
} // namespace
|
||||
|
@ -207,7 +207,7 @@ int32_t CooperateServer::GetParam(CallingContext &context, uint32_t id, MessageP
|
||||
ICooperate* cooperate = context_->GetPluginManager().LoadCooperate();
|
||||
CHKPR(cooperate, RET_ERR);
|
||||
auto enterStamp = std::chrono::steady_clock::now();
|
||||
auto checkParcelValid = [&enterStamp] () {
|
||||
auto checkParcelValid = [enterStamp] () {
|
||||
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::steady_clock::now() - enterStamp).count();
|
||||
return duration < SYNC_TASK_TIMEOUT_DURATION;
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
int32_t GetDragSummary(ITunnelClient &tunnel, std::map<std::string, int64_t> &summary,
|
||||
bool isJsCaller = false);
|
||||
int32_t GetDragState(ITunnelClient &tunnel, DragState &dragState);
|
||||
int32_t EnterTextEditorArea(ITunnelClient &tunnel, bool enable);
|
||||
int32_t EnableUpperCenterMode(ITunnelClient &tunnel, bool enable);
|
||||
int32_t GetDragAction(ITunnelClient &tunnel, DragAction &dragAction);
|
||||
int32_t GetExtraInfo(ITunnelClient &tunnel, std::string &extraInfo);
|
||||
int32_t AddPrivilege(ITunnelClient &tunnel);
|
||||
|
@ -445,7 +445,7 @@ int32_t IntentionManager::GetDragSummary(std::map<std::string, int64_t> &summary
|
||||
int32_t IntentionManager::EnterTextEditorArea(bool enable)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
return drag_.EnterTextEditorArea(*tunnel_, enable);
|
||||
return drag_.EnableUpperCenterMode(*tunnel_, enable);
|
||||
}
|
||||
|
||||
int32_t IntentionManager::AddPrivilege()
|
||||
|
@ -130,7 +130,6 @@ void SocketSessionManager::Dispatch(const struct epoll_event &ev)
|
||||
DispatchOne();
|
||||
} else if ((ev.events & (EPOLLHUP | EPOLLERR)) != 0) {
|
||||
FI_HILOGE("Epoll hangup:%{public}s", ::strerror(errno));
|
||||
/// TODO: Add error handling here.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1701,7 +1701,6 @@ void DragDrawing::SetDecodeOptions(Media::DecodeOptions &decodeOpts)
|
||||
FI_HILOGD("leave");
|
||||
}
|
||||
|
||||
|
||||
void DragDrawing::ParserDragShadowInfo(cJSON* filterInfoParser, FilterInfo &filterInfo)
|
||||
{
|
||||
CHKPV(filterInfoParser);
|
||||
@ -2878,10 +2877,10 @@ void DrawPixelMapModifier::Draw(Rosen::RSDrawingContext &context) const
|
||||
void DrawMouseIconModifier::Draw(Rosen::RSDrawingContext &context) const
|
||||
{
|
||||
FI_HILOGD("enter");
|
||||
std::shared_ptr<Media::PixelMap> pixelMap;
|
||||
std::shared_ptr<Media::PixelMap> pixelMap = std::make_shared<Media::PixelMap>();
|
||||
int32_t ret = MMI::InputManager::GetInstance()->GetPointerSnapshot(&pixelMap);
|
||||
if (ret != RET_OK) {
|
||||
FI_HILOGW("Get pointer snapshot failed, ret:%{public}d", ret);
|
||||
FI_HILOGE("Get pointer snapshot failed, ret:%{public}d", ret);
|
||||
pixelMap = DrawFromSVG();
|
||||
}
|
||||
CHKPV(pixelMap);
|
||||
|
@ -176,6 +176,8 @@ HWTEST_F(DragDataManagerTest, DragDataManagerTest003, TestSize.Level0)
|
||||
int32_t targetPid = IPCSkeleton::GetCallingPid();
|
||||
DRAG_DATA_MGR.SetTargetPid(targetPid);
|
||||
EXPECT_TRUE(targetPid == DRAG_DATA_MGR.GetTargetPid());
|
||||
float dragOriginDpi = DRAG_DATA_MGR.GetDragOriginDpi();
|
||||
EXPECT_TRUE(dragOriginDpi == 0.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,4 +58,3 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||
} // namespace DeviceStatus
|
||||
} // namespace Msdp
|
||||
} // namespace OHOS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user