diff --git a/common/include/dm_constants.h b/common/include/dm_constants.h index 5db4967a..34c6998a 100755 --- a/common/include/dm_constants.h +++ b/common/include/dm_constants.h @@ -196,6 +196,14 @@ const std::string EVENT_INIT_CODE = "2"; // timer const std::string TIMER_PREFIX = "deviceManagerTimer:"; +const std::string AUTHENTICATE_TIMEOUT_TASK = TIMER_PREFIX + "authenticate"; +const std::string NEGOTIATE_TIMEOUT_TASK = TIMER_PREFIX + "negotiate"; +const std::string CONFIRM_TIMEOUT_TASK = TIMER_PREFIX + "confirm"; +const std::string SHOW_TIMEOUT_TASK = TIMER_PREFIX + "show"; +const std::string INPUT_TIMEOUT_TASK = TIMER_PREFIX + "input"; +const std::string ADD_TIMEOUT_TASK = TIMER_PREFIX + "add"; +const std::string WAIT_NEGOTIATE_TIMEOUT_TASK = TIMER_PREFIX + "waitNegotiate"; +const std::string WAIT_REQUEST_TIMEOUT_TASK = TIMER_PREFIX + "waitRequest"; const std::string STATE_TIMER_PREFIX = "stateTimer_"; const int32_t TIMER_PREFIX_LENGTH = 19; const int32_t TIMER_DEFAULT = 0; diff --git a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp index ca27aba5..0b26255b 100644 --- a/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp +++ b/services/devicemanagerservice/src/authentication/dm_auth_manager.cpp @@ -35,15 +35,6 @@ namespace OHOS { namespace DistributedHardware { -const std::string AUTHENTICATE_TIMEOUT_TASK = TIMER_PREFIX + "authenticate"; -const std::string NEGOTIATE_TIMEOUT_TASK = TIMER_PREFIX + "negotiate"; -const std::string CONFIRM_TIMEOUT_TASK = TIMER_PREFIX + "confirm"; -const std::string SHOW_TIMEOUT_TASK = TIMER_PREFIX + "show"; -const std::string INPUT_TIMEOUT_TASK = TIMER_PREFIX + "input"; -const std::string ADD_TIMEOUT_TASK = TIMER_PREFIX + "add"; -const std::string WAIT_NEGOTIATE_TIMEOUT_TASK = TIMER_PREFIX + "waitNegotiate"; -const std::string WAIT_REQUEST_TIMEOUT_TASK = TIMER_PREFIX + "waitRequest"; - const int32_t SESSION_CANCEL_TIMEOUT = 0; const int32_t AUTHENTICATE_TIMEOUT = 120; const int32_t CONFIRM_TIMEOUT = 60; diff --git a/test/unittest/UTTest_auth_request_state.cpp b/test/unittest/UTTest_auth_request_state.cpp index 98a113df..c20d087e 100644 --- a/test/unittest/UTTest_auth_request_state.cpp +++ b/test/unittest/UTTest_auth_request_state.cpp @@ -35,9 +35,6 @@ void AuthRequestStateTest::TearDownTestCase() } namespace { -std::string AUTHENTICATE_TIMEOUT_TASK = "authenticateTimeoutTask"; -std::string NEGOTIATE_TIMEOUT_TASK = "negotiateTimeoutTask"; -std::string CONFIRM_TIMEOUT_TASK = "confirmTimeoutTask"; std::string INPUT_TIMEOUT_TASK = "inputTimeoutTask"; std::string ADD_TIMEOUT_TASK = "addTimeoutTask"; diff --git a/test/unittest/UTTest_device_manager_service.cpp b/test/unittest/UTTest_device_manager_service.cpp index a7e692a3..88f09281 100644 --- a/test/unittest/UTTest_device_manager_service.cpp +++ b/test/unittest/UTTest_device_manager_service.cpp @@ -40,8 +40,6 @@ void DeviceManagerServiceTest::TearDownTestCase() } namespace { -std::string INPUT_TIMEOUT_TASK = "inputTimeoutTask"; - /** * @tc.name: StartDeviceDiscovery_001 * @tc.desc: Set StartDeviceDiscovery's flag bit intFlag_ to False and return DM_NOT_INIT diff --git a/test/unittest/UTTest_dm_auth_manager.cpp b/test/unittest/UTTest_dm_auth_manager.cpp index e95bc93f..4250b6f2 100644 --- a/test/unittest/UTTest_dm_auth_manager.cpp +++ b/test/unittest/UTTest_dm_auth_manager.cpp @@ -38,12 +38,6 @@ void DmAuthManagerTest::TearDownTestCase() } namespace { -std::string AUTHENTICATE_TIMEOUT_TASK = "authenticateTimeoutTask"; -std::string NEGOTIATE_TIMEOUT_TASK = "negotiateTimeoutTask"; -std::string CONFIRM_TIMEOUT_TASK = "confirmTimeoutTask"; -std::string INPUT_TIMEOUT_TASK = "inputTimeoutTask"; -std::string ADD_TIMEOUT_TASK = "addTimeoutTask"; - std::shared_ptr softbusConnector = std::make_shared(); std::shared_ptr listener = std::make_shared(); std::shared_ptr hiChainConnector_ = std::make_shared();