mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-11-30 11:11:06 +00:00
Merge branch 'master' of https://gitee.com/openharmony/msdp_device_status into dev_snake_animation
Change-Id: I04e4fb56b9de78df3d30a1f3aa0d77e96d325f78
This commit is contained in:
commit
f38b79362e
@ -84,6 +84,7 @@
|
||||
"interaction/include/drag_data.h",
|
||||
"interaction/include/i_coordination_listener.h",
|
||||
"interaction/include/i_drag_listener.h",
|
||||
"interaction/include/i_start_drag_listener.h",
|
||||
"interaction/include/interaction_manager.h"
|
||||
],
|
||||
"header_base": "//base/msdp/device_status/interfaces/innerkits"
|
||||
|
@ -46,6 +46,8 @@ constexpr int32_t DISPLAY_ID { 0 };
|
||||
constexpr int32_t DISPLAY_X { 50 };
|
||||
constexpr int32_t DISPLAY_Y { 50 };
|
||||
constexpr int32_t DRAG_NUM_ONE { 1 };
|
||||
constexpr int32_t SHADOW_NUM_ONE { 1 };
|
||||
constexpr int32_t SHADOW_NUM_MULTIPLE { 3 };
|
||||
constexpr int32_t DRAG_NUM_MULTIPLE { 10 };
|
||||
constexpr int32_t INT32_BYTE { 4 };
|
||||
constexpr int32_t PROMISE_WAIT_SPAN_MS { 2000 };
|
||||
@ -67,7 +69,7 @@ public:
|
||||
void TearDown();
|
||||
static void SetUpTestCase();
|
||||
static std::shared_ptr<Media::PixelMap> CreatePixelMap(int32_t width, int32_t height);
|
||||
static std::optional<DragData> CreateDragData(int32_t sourceType, int32_t pointerId, int32_t dragNum);
|
||||
static std::optional<DragData> CreateDragData(int32_t sourceType, int32_t pointerId, int32_t dragNum, int32_t shadowNum);
|
||||
};
|
||||
|
||||
void InteractionDragDrawingTest::SetUpTestCase() {}
|
||||
@ -115,13 +117,13 @@ std::shared_ptr<Media::PixelMap> InteractionDragDrawingTest::CreatePixelMap(int3
|
||||
|
||||
class TestStartDragListener : public IStartDragListener {
|
||||
public:
|
||||
explicit TestStartDragListener(std::function<void()> function) : function_(function) { }
|
||||
explicit TestStartDragListener(std::function<void(const DragNotifyMsg&)> function) : function_(function) { }
|
||||
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));
|
||||
if (function_ != nullptr) {
|
||||
function_();
|
||||
function_(msg);
|
||||
}
|
||||
FI_HILOGI("WLD test OnDragEndMessage");
|
||||
}
|
||||
@ -131,21 +133,22 @@ public:
|
||||
FI_HILOGI("WLD test OnHideIconMessage");
|
||||
}
|
||||
private:
|
||||
std::function<void()> function_;
|
||||
std::function<void(const DragNotifyMsg&)> function_;
|
||||
};
|
||||
|
||||
std::optional<DragData> InteractionDragDrawingTest::CreateDragData(int32_t sourceType,
|
||||
int32_t pointerId, int32_t dragNum)
|
||||
int32_t pointerId, int32_t dragNum, int32_t shadowNum)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
std::shared_ptr<Media::PixelMap> pixelMap = CreatePixelMap(PIXEL_MAP_WIDTH, PIXEL_MAP_HEIGHT);
|
||||
if (pixelMap == nullptr) {
|
||||
FI_HILOGE("CreatePixelMap failed");
|
||||
return std::nullopt;
|
||||
}
|
||||
ShadowInfo shadowInfo { pixelMap, 0, 0 };
|
||||
DragData dragData;
|
||||
dragData.shadowInfos.push_back(shadowInfo);
|
||||
for (int32_t i = 0; i< shadowNum; i++) {
|
||||
std::shared_ptr<Media::PixelMap> pixelMap = CreatePixelMap(PIXEL_MAP_WIDTH, PIXEL_MAP_HEIGHT);
|
||||
if (pixelMap == nullptr) {
|
||||
FI_HILOGE("CreatePixelMap failed");
|
||||
return std::nullopt;
|
||||
}
|
||||
dragData.shadowInfos.push_back({ pixelMap, 0, 0 });
|
||||
}
|
||||
dragData.buffer = std::vector<uint8_t>(MAX_BUFFER_SIZE, 0);
|
||||
dragData.udKey = UD_KEY;
|
||||
dragData.extraInfo = FILTER_INFO;
|
||||
@ -170,7 +173,7 @@ HWTEST_F(InteractionDragDrawingTest, InteractionDragDrawingTest_Mouse_DragNum_On
|
||||
{
|
||||
CALL_TEST_DEBUG;
|
||||
std::optional<DragData> dragData = CreateDragData(
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, POINTER_ID, DRAG_NUM_ONE);
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, POINTER_ID, DRAG_NUM_ONE, SHADOW_NUM_ONE);
|
||||
ASSERT_TRUE(dragData);
|
||||
std::promise<bool> promiseFlag;
|
||||
std::future<bool> futureFlag = promiseFlag.get_future();
|
||||
@ -218,7 +221,7 @@ HWTEST_F(InteractionDragDrawingTest, InteractionDragDrawingTest_Mouse_DragNum_Mu
|
||||
promiseFlag.set_value(true);
|
||||
};
|
||||
std::optional<DragData> dragData = CreateDragData(
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, POINTER_ID, DRAG_NUM_MULTIPLE);
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, POINTER_ID, DRAG_NUM_MULTIPLE, SHADOW_NUM_ONE);
|
||||
ASSERT_TRUE(dragData);
|
||||
int32_t ret = InteractionManager::GetInstance()->StartDrag(dragData.value(), std::make_shared<TestStartDragListener>(callback));
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
@ -259,7 +262,7 @@ HWTEST_F(InteractionDragDrawingTest, InteractionDragDrawingTest_Touchscreen_Drag
|
||||
promiseFlag.set_value(true);
|
||||
};
|
||||
std::optional<DragData> dragData = CreateDragData(
|
||||
MMI::PointerEvent::SOURCE_TYPE_TOUCHSCREEN, POINTER_ID, DRAG_NUM_ONE);
|
||||
MMI::PointerEvent::SOURCE_TYPE_TOUCHSCREEN, POINTER_ID, DRAG_NUM_ONE, SHADOW_NUM_ONE);
|
||||
ASSERT_TRUE(dragData);
|
||||
int32_t ret = InteractionManager::GetInstance()->StartDrag(dragData.value(), std::make_shared<TestStartDragListener>(callback));
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
@ -293,7 +296,7 @@ HWTEST_F(InteractionDragDrawingTest, InteractionDragDrawingTest_Touchscreen_Drag
|
||||
{
|
||||
CALL_TEST_DEBUG;
|
||||
std::optional<DragData> dragData = CreateDragData(
|
||||
MMI::PointerEvent::SOURCE_TYPE_TOUCHSCREEN, POINTER_ID, DRAG_NUM_MULTIPLE);
|
||||
MMI::PointerEvent::SOURCE_TYPE_TOUCHSCREEN, POINTER_ID, DRAG_NUM_MULTIPLE, SHADOW_NUM_ONE);
|
||||
ASSERT_TRUE(dragData);
|
||||
std::promise<bool> promiseFlag;
|
||||
std::future<bool> futureFlag = promiseFlag.get_future();
|
||||
@ -341,7 +344,7 @@ HWTEST_F(InteractionDragDrawingTest, InteractionDragDrawingTest_UpdateShadowPic,
|
||||
promiseFlag.set_value(true);
|
||||
};
|
||||
std::optional<DragData> dragData = CreateDragData(
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, POINTER_ID, DRAG_NUM_ONE);
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, POINTER_ID, DRAG_NUM_ONE, SHADOW_NUM_ONE);
|
||||
ASSERT_TRUE(dragData);
|
||||
int32_t ret = InteractionManager::GetInstance()->StartDrag(dragData.value(), std::make_shared<TestStartDragListener>(callback));
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
@ -378,7 +381,7 @@ HWTEST_F(InteractionDragDrawingTest, InteractionDragDrawingTest_Mouse_Animation,
|
||||
promiseFlag.set_value(true);
|
||||
};
|
||||
std::optional<DragData> dragData = CreateDragData(
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, POINTER_ID, DRAG_NUM_ONE);
|
||||
MMI::PointerEvent::SOURCE_TYPE_MOUSE, POINTER_ID, DRAG_NUM_ONE, SHADOW_NUM_ONE);
|
||||
ASSERT_TRUE(dragData);
|
||||
int32_t ret = InteractionManager::GetInstance()->StartDrag(dragData.value(), std::make_shared<TestStartDragListener>(callback));
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
@ -410,7 +413,39 @@ HWTEST_F(InteractionDragDrawingTest, InteractionDragDrawingTest_Touchscreen_Anim
|
||||
promiseFlag.set_value(true);
|
||||
};
|
||||
std::optional<DragData> dragData = CreateDragData(
|
||||
MMI::PointerEvent::SOURCE_TYPE_TOUCHSCREEN, POINTER_ID, DRAG_NUM_ONE);
|
||||
MMI::PointerEvent::SOURCE_TYPE_TOUCHSCREEN, POINTER_ID, DRAG_NUM_ONE, SHADOW_NUM_ONE);
|
||||
ASSERT_TRUE(dragData);
|
||||
int32_t ret = InteractionManager::GetInstance()->StartDrag(dragData.value(), std::make_shared<TestStartDragListener>(callback));
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
ret = InteractionManager::GetInstance()->SetDragWindowVisible(DRAG_WINDOW_VISIBLE);
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
ret = InteractionManager::GetInstance()->UpdateDragStyle(DragCursorStyle::COPY);
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
DragDropResult dropResult { DragResult::DRAG_FAIL, NOT_HAS_CUSTOM_ANIMATION, WINDOW_ID };
|
||||
ret = InteractionManager::GetInstance()->StopDrag(dropResult);
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
ASSERT_TRUE(futureFlag.wait_for(std::chrono::milliseconds(PROMISE_WAIT_SPAN_MS)) != std::future_status::timeout);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(TIME_WAIT_FOR_ANIMATION_END));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: InteractionDragDrawingTest_Multiple_Shadow
|
||||
* @tc.desc: Drag Drawing
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(InteractionDragDrawingTest, InteractionDragDrawingTest_Multiple_Shadow, TestSize.Level1)
|
||||
{
|
||||
CALL_TEST_DEBUG;
|
||||
std::promise<bool> promiseFlag;
|
||||
std::future<bool> futureFlag = promiseFlag.get_future();
|
||||
auto callback = [&promiseFlag](const DragNotifyMsg& notifyMessage) {
|
||||
FI_HILOGD("displayX:%{public}d, displayY:%{public}d, result:%{public}d, target:%{public}d",
|
||||
notifyMessage.displayX, notifyMessage.displayY, notifyMessage.result, notifyMessage.targetPid);
|
||||
promiseFlag.set_value(true);
|
||||
};
|
||||
std::optional<DragData> dragData = CreateDragData(
|
||||
MMI::PointerEvent::SOURCE_TYPE_TOUCHSCREEN, POINTER_ID, DRAG_NUM_ONE, SHADOW_NUM_MULTIPLE);
|
||||
ASSERT_TRUE(dragData);
|
||||
int32_t ret = InteractionManager::GetInstance()->StartDrag(dragData.value(), std::make_shared<TestStartDragListener>(callback));
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
|
@ -218,13 +218,13 @@ private:
|
||||
|
||||
class TestStartDragListener : public IStartDragListener {
|
||||
public:
|
||||
explicit TestStartDragListener(std::function<void()> function) : function_(function) { }
|
||||
explicit TestStartDragListener(std::function<void(const DragNotifyMsg&)> function) : function_(function) { }
|
||||
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));
|
||||
if (function_ != nullptr) {
|
||||
function_();
|
||||
function_(msg);
|
||||
}
|
||||
FI_HILOGI("WLD test OnDragEndMessage");
|
||||
}
|
||||
@ -234,7 +234,7 @@ public:
|
||||
FI_HILOGI("WLD test OnHideIconMessage");
|
||||
}
|
||||
private:
|
||||
std::function<void()> function_;
|
||||
std::function<void(const DragNotifyMsg&)> function_;
|
||||
};
|
||||
|
||||
std::vector<int32_t> InteractionManagerTest::GetInputDeviceIds()
|
||||
@ -325,7 +325,7 @@ std::shared_ptr<Media::PixelMap> InteractionManagerTest::CreatePixelMap(int32_t
|
||||
return pixelMap;
|
||||
}
|
||||
|
||||
std::optional<DragData> InteractionDragTest::CreateDragData(const std::pair<int32_t, int32_t> &pixelMapSize,
|
||||
std::optional<DragData> InteractionManagerTest::CreateDragData(const std::pair<int32_t, int32_t> &pixelMapSize,
|
||||
int32_t sourceType, int32_t pointerId, int32_t displayId, const std::pair<int32_t, int32_t> &location)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
@ -458,17 +458,19 @@ void InteractionManagerTest::TestRemoveMonitor(int32_t monitorId)
|
||||
void InteractionManagerTest::PrintDragData(const DragData &dragData)
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
FI_HILOGD("PixelFormat:%{public}d, PixelAlphaType:%{public}d, PixelAllocatorType:%{public}d,"
|
||||
" PixelWidth:%{public}d, PixelHeight:%{public}d, shadowX:%{public}d, shadowY:%{public}d,"
|
||||
" sourceType:%{public}d, pointerId:%{public}d, displayId:%{public}d, displayX:%{public}d,"
|
||||
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);
|
||||
|
||||
}
|
||||
FI_HILOGD("SourceType:%{public}d, pointerId:%{public}d, displayId:%{public}d, displayX:%{public}d,"
|
||||
" displayY:%{public}d, dragNum:%{public}d, hasCanceledAnimation:%{public}d, udKey:%{public}s",
|
||||
static_cast<int32_t>(dragData.shadowInfo.pixelMap->GetPixelFormat()),
|
||||
static_cast<int32_t>(dragData.shadowInfo.pixelMap->GetAlphaType()),
|
||||
static_cast<int32_t>(dragData.shadowInfo.pixelMap->GetAllocatorType()),
|
||||
dragData.shadowInfo.pixelMap->GetWidth(), dragData.shadowInfo.pixelMap->GetHeight(),
|
||||
dragData.shadowInfo.x, dragData.shadowInfo.y, dragData.sourceType, dragData.pointerId,
|
||||
dragData.displayId, dragData.displayX, dragData.displayY, dragData.dragNum, dragData.hasCanceledAnimation,
|
||||
dragData.udKey.substr(0, SUBSTR_UDKEY_LEN).c_str());
|
||||
dragData.sourceType, dragData.pointerId, dragData.displayId, dragData.displayX, dragData.displayY,
|
||||
dragData.dragNum, dragData.hasCanceledAnimation, dragData.udKey.substr(0, SUBSTR_UDKEY_LEN).c_str());
|
||||
}
|
||||
|
||||
class InputEventCallbackTest : public MMI::IInputEventConsumer {
|
||||
@ -997,8 +999,7 @@ HWTEST_F(InteractionManagerTest, InteractionManagerTest_StartDrag_Failed_Mouse,
|
||||
|
||||
int32_t ret = InteractionManager::GetInstance()->StartDrag(dragData.value(), nullptr);
|
||||
ASSERT_EQ(ret, RET_ERR);
|
||||
|
||||
dragData->shadowInfo.pixelMap = nullptr;
|
||||
dragData->shadowInfos = {};
|
||||
ret = InteractionManager::GetInstance()->StartDrag(dragData.value(), std::make_shared<TestStartDragListener>(callback));
|
||||
ASSERT_EQ(ret, RET_ERR);
|
||||
}
|
||||
@ -1448,19 +1449,7 @@ HWTEST_F(InteractionManagerTest, GetDragData_Success, TestSize.Level1)
|
||||
DragData replyDragData;
|
||||
ret = InteractionManager::GetInstance()->GetDragData(replyDragData);
|
||||
ASSERT_EQ(ret, RET_OK);
|
||||
ASSERT_NE(replyDragData.shadowInfo.pixelMap, nullptr);
|
||||
ASSERT_EQ(replyDragData.shadowInfo.pixelMap->GetWidth(), TEST_PIXEL_MAP_WIDTH);
|
||||
ASSERT_EQ(replyDragData.shadowInfo.pixelMap->GetHeight(), TEST_PIXEL_MAP_HEIGHT);
|
||||
ASSERT_EQ(dragData->udKey, replyDragData.udKey);
|
||||
ASSERT_EQ(dragData->shadowInfo.x, replyDragData.shadowInfo.x);
|
||||
ASSERT_EQ(dragData->shadowInfo.y, replyDragData.shadowInfo.y);
|
||||
ASSERT_EQ(dragData->sourceType, replyDragData.sourceType);
|
||||
ASSERT_EQ(dragData->pointerId, replyDragData.pointerId);
|
||||
ASSERT_EQ(dragData->dragNum, replyDragData.dragNum);
|
||||
ASSERT_EQ(dragData->displayX, replyDragData.displayX);
|
||||
ASSERT_EQ(dragData->displayY, replyDragData.displayY);
|
||||
ASSERT_EQ(dragData->displayId, replyDragData.displayId);
|
||||
ASSERT_EQ(dragData->hasCanceledAnimation, replyDragData.hasCanceledAnimation);
|
||||
ASSERT_EQ(replyDragData, *dragData);
|
||||
PrintDragData(replyDragData);
|
||||
SimulateUpEvent({ DRAG_SRC_X, DRAG_SRC_Y }, MMI::PointerEvent::SOURCE_TYPE_MOUSE, MOUSE_POINTER_ID);
|
||||
DragDropResult dropResult { DragResult::DRAG_SUCCESS, HAS_CUSTOM_ANIMATION, WINDOW_ID };
|
||||
|
@ -30,7 +30,7 @@ namespace DeviceStatus {
|
||||
using namespace AppExecFwk;
|
||||
namespace {
|
||||
constexpr OHOS::HiviewDFX::HiLogLabel LABEL { LOG_CORE, MSDP_DOMAIN_ID, "Client" };
|
||||
const std::string THREAD_NAME { "ClientEventHandler" };
|
||||
const std::string THREAD_NAME { "os_ClientEventHandler" };
|
||||
} // namespace
|
||||
|
||||
Client::~Client()
|
||||
|
@ -30,6 +30,17 @@ struct ShadowInfo {
|
||||
std::shared_ptr<OHOS::Media::PixelMap> pixelMap { nullptr };
|
||||
int32_t x { -1 };
|
||||
int32_t y { -1 };
|
||||
public:
|
||||
bool operator==(const ShadowInfo &shadow) const
|
||||
{
|
||||
if (pixelMap == nullptr && shadow.pixelMap == nullptr) {
|
||||
return x == shadow.x && y == shadow.y;
|
||||
}
|
||||
if (pixelMap == nullptr || shadow.pixelMap == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return pixelMap->IsSameImage(*(shadow.pixelMap)) && x == shadow.x && y == shadow.y;
|
||||
}
|
||||
};
|
||||
|
||||
struct DragData {
|
||||
@ -45,6 +56,23 @@ struct DragData {
|
||||
int32_t displayY { -1 };
|
||||
int32_t displayId { -1 };
|
||||
bool hasCanceledAnimation { false };
|
||||
public:
|
||||
bool operator==(const DragData &dragData) const
|
||||
{
|
||||
if (shadowInfos.size() != dragData.shadowInfos.size()) {
|
||||
return false;
|
||||
}
|
||||
int32_t size = shadowInfos.size();
|
||||
for (int32_t i = 0; i < size; i++) {
|
||||
if (!(shadowInfos[i] == dragData.shadowInfos[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return buffer == dragData.buffer && udKey == dragData.udKey && filterInfo == dragData.filterInfo &&
|
||||
extraInfo == dragData.extraInfo && sourceType == dragData.sourceType && dragNum == dragData.dragNum &&
|
||||
pointerId == dragData.pointerId && displayX == dragData.displayX && displayY == dragData.displayY &&
|
||||
displayId == dragData.displayId && hasCanceledAnimation == dragData.hasCanceledAnimation;
|
||||
}
|
||||
};
|
||||
|
||||
enum class DragState {
|
||||
|
@ -196,7 +196,7 @@ bool SensorDataCallback::UnregisterCallbackSensor(int32_t sensorTypeId)
|
||||
|
||||
void SensorDataCallback::AlgorithmLoop()
|
||||
{
|
||||
SetThreadName(std::string("device_status_sensor"));
|
||||
SetThreadName(std::string("os_loop_sensor"));
|
||||
CALL_DEBUG_ENTER;
|
||||
while (alive_) {
|
||||
sem_wait(&sem_);
|
||||
|
@ -224,7 +224,7 @@ void DeviceStatusMsdpMock::StartThread()
|
||||
|
||||
void DeviceStatusMsdpMock::LoopingThreadEntry()
|
||||
{
|
||||
SetThreadName("device_status_mock");
|
||||
SetThreadName("os_loop_mock");
|
||||
if (callbacks_.empty()) {
|
||||
FI_HILOGD("callbacks_ is empty");
|
||||
return;
|
||||
|
@ -125,7 +125,7 @@ int32_t DeviceStatusMsdpMocKTest::UnloadMockLibrary(const std::shared_ptr<MsdpAl
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest001
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -139,7 +139,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest001, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest002
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -155,7 +155,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest002, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest003
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -171,7 +171,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest003, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest004
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -187,7 +187,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest004, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest005
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -203,7 +203,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest005, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest006
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -219,7 +219,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest006, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest007
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -235,7 +235,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest007, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest008
|
||||
* @tc.desc: test devicestatus DisableCount
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -252,7 +252,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest008, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest009
|
||||
* @tc.desc: test devicestatus NotifyMsdpImpl
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -263,7 +263,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest009, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest010
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -280,7 +280,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest010, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest011
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -297,7 +297,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest011, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest012
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -314,7 +314,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest012, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest013
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -334,7 +334,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest013, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest014
|
||||
* @tc.desc: test devicestatus NotifyMsdpImpl
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -346,7 +346,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest014, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest015
|
||||
* @tc.desc: test devicestatus NotifyMsdpImpl
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -359,7 +359,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest015, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest016
|
||||
* @tc.desc: test devicestatus NotifyMsdpImpl
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -372,7 +372,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest016, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest017
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -385,7 +385,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest017, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest018
|
||||
* @tc.desc: test devicestatus RegisterCallback
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
@ -407,7 +407,7 @@ HWTEST_F(DeviceStatusMsdpMocKTest, DeviceStatusMsdpMocKTest018, TestSize.Level1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DeviceStatusMsdpMockTest
|
||||
* @tc.name: DeviceStatusMsdpMocKTest019
|
||||
* @tc.desc: test devicestatus Mock in Algorithm
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
|
@ -528,7 +528,7 @@ int32_t DeviceStatusSrvStub::GetDragDataStub(MessageParcel& data, MessageParcel&
|
||||
FI_HILOGE("Get DragData failed, ret:%{public}d", ret);
|
||||
return RET_ERR;
|
||||
}
|
||||
if (ShadowPacker::MarshallingShadowInfos(dragData.shadowInfos, data) != RET_OK) {
|
||||
if (ShadowPacker::MarshallingShadowInfos(dragData.shadowInfos, reply) != RET_OK) {
|
||||
FI_HILOGE("MarshallingShadowInfos failed");
|
||||
return RET_ERR;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ constexpr int32_t MOUSE_DRAG_CURSOR_CIRCLE_STYLE { 41 };
|
||||
constexpr int32_t CURSOR_CIRCLE_MIDDLE { 2 };
|
||||
const std::string DEVICE_TYPE_DEFAULT { "default" };
|
||||
const std::string DEVICE_TYPE_PHONE { "phone" };
|
||||
const std::string THREAD_NAME { "AnimationEventRunner" };
|
||||
const std::string THREAD_NAME { "os_AnimationEventRunner" };
|
||||
const std::string COPY_DRAG_PATH { "/system/etc/device_status/drag_icon/Copy_Drag.svg" };
|
||||
const std::string COPY_ONE_DRAG_PATH { "/system/etc/device_status/drag_icon/Copy_One_Drag.svg" };
|
||||
const std::string DEFAULT_DRAG_PATH { "/system/etc/device_status/drag_icon/Default_Drag.svg" };
|
||||
|
@ -427,7 +427,7 @@ int32_t DeviceStatusService::InitTimerMgr()
|
||||
|
||||
void DeviceStatusService::OnThread()
|
||||
{
|
||||
SetThreadName(std::string("device_status_service"));
|
||||
SetThreadName(std::string("os_ds_service"));
|
||||
uint64_t tid = GetThisThreadId();
|
||||
delegateTasks_.SetWorkerThreadId(tid);
|
||||
FI_HILOGD("Main worker thread start, tid:%{public}" PRId64 "", tid);
|
||||
|
Loading…
Reference in New Issue
Block a user