内源问题修改

Signed-off-by: wangyb0625 <wangyibo38@huawei.com>
This commit is contained in:
wangyb0625
2022-03-24 18:02:12 +08:00
parent 179bc4a1b2
commit 93acc6c201
47 changed files with 44 additions and 58 deletions
-2
View File
@@ -217,8 +217,6 @@ dmClass.unAuthenticateDevice(this.deviceInfo);
将devicemanager/display工程导入DevEco Studio 2.2 Beta1,复制display目录下的@ohos.distributedHardware.deviceManager.d.ts文件到Sdk\js\2.2.0.1\api\common目录下,进行编译构建及运行调试.
DevEco Studio使用方法请参考[DevEco Studio使用说明](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/tools_overview-0000001053582387)。
- 编译环境依赖:IDE 2.2 SDK6
- DeviceManager_UI.hap存放位置:[applications_hap仓库](https://gitee.com/openharmony/applications_hap)
@@ -40,4 +40,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DEVICE_MANAGER_IPC_GET_DM_FA_PARAM_RSP_H
#endif // OHOS_DEVICE_MANAGER_IPC_GET_DM_FA_PARAM_RSP_H
@@ -39,4 +39,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DEVICE_MANAGER_IPC_GET_INFO_BY_NETWORK_REQ_H
#endif // OHOS_DEVICE_MANAGER_IPC_GET_INFO_BY_NETWORK_REQ_H
@@ -51,4 +51,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DEVICE_MANAGER_IPC_GET_INFO_BY_NETWORK_RSP_H
#endif // OHOS_DEVICE_MANAGER_IPC_GET_INFO_BY_NETWORK_RSP_H
@@ -40,4 +40,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_IPC_GET_LOCAL_DEVICE_INFO_RSP_H
#endif // OHOS_DM_IPC_GET_LOCAL_DEVICE_INFO_RSP_H
+1 -2
View File
@@ -42,5 +42,4 @@ private: \
}
}; // namespace DistributedHardware
}; // namespace OHOS
#endif // OHOS_DM_SINGLE_INSTANCE_H
#endif // OHOS_DM_SINGLE_INSTANCE_H
-1
View File
@@ -15,7 +15,6 @@
apply plugin: 'com.huawei.ohos.hap'
apply plugin: 'com.huawei.ohos.decctest'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
compileSdkVersion 6
defaultConfig {
@@ -23,7 +23,6 @@
#include "dm_device_info.h"
#include "dm_subscribe_info.h"
#include "nlohmann/json.hpp"
#include "dm_device_info.h"
#include "jsi.h"
namespace OHOS {
@@ -89,7 +89,7 @@ private:
private:
std::shared_ptr<HichainConnectorCallback> hichainConnectorCallback_ = nullptr;
const DeviceGroupManager *deviceGroupManager_ = nullptr;
DeviceAuthCallback deviceAuthCallback_ ;
DeviceAuthCallback deviceAuthCallback_;
};
} // namespace DistributedHardware
} // namespace OHOS
@@ -250,7 +250,7 @@ void HichainConnector::OnMemberJoin(int64_t requestId, int32_t status)
}
if (hichainConnectorCallback_ == nullptr) {
DMLOG(DM_LOG_ERROR, "HichainConnector::OnMemberJoin hichainConnectorCallback_ not registe.");
DMLOG(DM_LOG_ERROR, "HichainConnector::OnMemberJoin hichainConnectorCallback_ not register.");
return;
}
hichainConnectorCallback_->OnMemberJoin(requestId, status);
@@ -18,7 +18,6 @@
#include "msg_head.h"
#include "constants.h"
#include "device_manager_log.h"
#include "device_manager_errno.h"
namespace OHOS {
@@ -20,13 +20,10 @@
#include "constants.h"
#include "encrypt_utils.h"
#include "device_manager_errno.h"
#include "device_manager_log.h"
#include "encrypt_utils.h"
#include "msg_request_auth.h"
#include "parameter.h"
#include "softbus_session.h"
#include "softbus_bus_center.h"
#include "msg_request_auth.h"
namespace OHOS {
namespace DistributedHardware {
@@ -19,7 +19,6 @@
#include "constants.h"
#include "msg_codec.h"
#include "device_manager_log.h"
#include "msg_codec.h"
#include "device_manager_errno.h"
#include "softbus_session.h"
#include "encrypt_utils.h"
+1 -1
View File
@@ -46,4 +46,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_PROFILE_CONNECTOR_H
#endif // OHOS_DM_PROFILE_CONNECTOR_H
@@ -25,4 +25,4 @@ public:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_PROFILE_CONNECTOR_CALLBACK_H
#endif // OHOS_DM_PROFILE_CONNECTOR_CALLBACK_H
@@ -176,7 +176,7 @@ private:
int32_t appIconLen { 0 };
uint8_t *appIcon { nullptr };
int32_t appThumbnailLen { 0 };
uint8_t *appThumbnail { nullptr } ;
uint8_t *appThumbnail { nullptr };
const int32_t ICON_MAX_LEN = 32 * 1024;
const int32_t THUMB_MAX_LEN = 153 * 1024;
};
@@ -35,4 +35,4 @@ public:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_IPC_CLIENT_H
#endif // OHOS_DM_IPC_CLIENT_H
@@ -41,4 +41,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_IPC_CLIENT_PROXY_H
#endif // OHOS_DM_IPC_CLIENT_PROXY_H
@@ -57,4 +57,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_IPC_CLIENT_MANAGER_H
#endif // OHOS_DM_IPC_CLIENT_MANAGER_H
+1 -2
View File
@@ -41,5 +41,4 @@ protected:
napi_ref thisVarRef_;
std::map<std::string, std::shared_ptr<DmEventListener>> eventMap_;
};
#endif /* OHOS_DM_NATIVE_EVENT_H */
#endif // OHOS_DM_NATIVE_EVENT_H
+1 -1
View File
@@ -103,4 +103,4 @@ void DmNativeEvent::OnEvent(const std::string &eventType, size_t argc, const nap
return;
}
napi_close_handle_scope(env_, scope);
}
}
@@ -82,4 +82,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_OHOS_DM_CONFIG_MANAGER_H
#endif // OHOS_OHOS_DM_CONFIG_MANAGER_H
@@ -93,4 +93,4 @@ const std::string authJsonConfigString =
})";
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_OHOS_DM_JSON_CONFIG_H
#endif // OHOS_OHOS_DM_JSON_CONFIG_H
@@ -67,4 +67,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_EVENT_MANAGER_ADAPT_H
#endif // OHOS_EVENT_MANAGER_ADAPT_H
@@ -30,4 +30,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_MULTIPLE_USER_CONNECTOR_H
#endif // OHOS_DM_MULTIPLE_USER_CONNECTOR_H
@@ -128,7 +128,6 @@ void AuthMessageProcessor::CreateResponseAuthMessage(nlohmann::json &json)
json[TAG_REPLY] = authResponseContext_->reply;
json[TAG_DEVICE_ID] = authResponseContext_->deviceId;
json[TAG_TOKEN] = authResponseContext_->token;
LOGI("AuthMessageProcessor::ParseAuthResponseMessage %s", authResponseContext_->deviceId.c_str());
if (authResponseContext_->reply == 0) {
std::string groupId = authResponseContext_->groupId;
LOGI("AuthMessageProcessor::CreateSimpleMessage groupId %d", groupId.c_str());
@@ -296,4 +296,4 @@ void DmConfigManager::GetAuthAdapter(std::map<int32_t, std::shared_ptr<IAuthenti
}
}
} // namespace DistributedHardware
} // namespace OHOS
} // namespace OHOS
@@ -80,7 +80,7 @@ bool DmCommonEventManager::SubscribeServiceEvent(const std::string &event, const
LOGE("subscriber is nullptr %s", event.c_str());
return false;
}
if (!CommonEventManager::SubscribeCommonEvent(subscriber)) {
LOGE("Subscribe service event failed: %s", event.c_str());
return false;
@@ -123,7 +123,7 @@ void DmCommonEventManager::EventSubscriber::OnReceiveEvent(const CommonEventData
LOGE("userId is less zero");
return;
}
std::unique_lock<std::mutex> callbackQueueMutexLock(callbackQueueMutex_);
if (callbackQueue_.size() > COMMON_CALLBACK_MAX_SIZE) {
LOGE("event callback Queue is too long");
@@ -135,4 +135,4 @@ void DmCommonEventManager::EventSubscriber::OnReceiveEvent(const CommonEventData
notEmpty_.notify_one();
}
} // namespace DistributedHardware
} // namespace OHOS
} // namespace OHOS
@@ -50,4 +50,4 @@ int32_t MultipleUserConnector::GetSwitchOldUserId(void)
return oldUserId_;
}
} // namespace DistributedHardware
} // namespace OHOS
} // namespace OHOS
@@ -62,4 +62,4 @@ const std::map<std::string, CommonSvcId> &IpcServerListenermgr::GetAllListeners(
return dmListenerMap_;
}
} // namespace DistributedHardware
} // namespace OHOS
} // namespace OHOS
@@ -24,4 +24,4 @@ int32_t main(int32_t argc, char *argv[])
pause();
}
return 0;
}
}
@@ -33,4 +33,4 @@ public:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DEVICE_MESSAGE_TEST_H
#endif // OHOS_DEVICE_MESSAGE_TEST_H
@@ -194,7 +194,7 @@ HWTEST_F(DeviceManagerServiceTest, GetTrustedDeviceList_001, testing::ext::TestS
/**
* @tc.name: GetTrustedDeviceList_002
* @tc.desc:Set the intFlag of GetTrustedDeviceList to true and pkgName = null ; The return value is DM_INPUT_PARA_EMPTY
* @tc.desc:Set the intFlag of GetTrustedDeviceList to true and pkgName = null; The return value is DM_INPUT_PARA_EMPTY
* @tc.type: FUNC
* @tc.require: AR000GHSJK
*/
@@ -41,4 +41,4 @@ public:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif
#endif
@@ -107,6 +107,6 @@ HWTEST_F(DeviceManagerServiceListenerTest, OnVerifyAuthResult_001, testing::ext:
std::string ret = pReq->GetDeviceId();
EXPECT_EQ(ret, deviceId);
}
} // namespace
}
} // namespace DistributedHardware
} // namespace OHOS
} // namespace OHOS
@@ -39,4 +39,4 @@ public:
} // namespace OHOS
#undef private
#undef protected
#endif
#endif
@@ -54,6 +54,6 @@ HWTEST_F(DeviceManagerImplTest, DmDeviceInfoManager_001, testing::ext::TestSize.
std::shared_ptr<DmDeviceInfoManager> p = std::make_shared<DmDeviceInfoManager>(softbusConnector);
ASSERT_NE(p, nullptr);
}
} // namespace
}
} // namespace DistributedHardware
} // namespace OHOS
} // namespace OHOS
@@ -39,4 +39,4 @@ public:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif
#endif
@@ -203,6 +203,6 @@ HWTEST_F(DmDeviceStateManagerTest, RegisterSoftbusStateCallback_001, testing::ex
int ret = dmDeviceStateManager->RegisterSoftbusStateCallback();
EXPECT_EQ(ret, DM_OK);
}
} // namespace
}
} // namespace DistributedHardware
} // namespace OHOS
@@ -35,4 +35,4 @@ public:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif
#endif
+1 -1
View File
@@ -315,6 +315,6 @@ HWTEST_F(SoftbusConnectorTest, CovertNodeBasicInfoToDmDevice_001, testing::ext::
int ret = softbusConnector->CovertNodeBasicInfoToDmDevice(nodeBasicInfo, dmDeviceInfo);
EXPECT_EQ(ret, DM_OK);
}
} // namespace
}
} // namespace DistributedHardware
} // namespace OHOS
+1 -1
View File
@@ -45,4 +45,4 @@ public:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif
#endif
+1 -1
View File
@@ -35,4 +35,4 @@ public:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_IPC_SERVER_LISTENER_H
#endif // OHOS_DM_IPC_SERVER_LISTENER_H
+1 -2
View File
@@ -35,5 +35,4 @@ int GetDevUdid(char *udid, int size);
}
#endif
#endif /* __cplusplus */
#endif
#endif
+1 -2
View File
@@ -24,5 +24,4 @@ std::string GetAnonyString(const std::string &value);
std::string GetAnonyInt32(const int32_t value);
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_ANONYMOUS_H
#endif // OHOS_DM_ANONYMOUS_H
+1 -1
View File
@@ -112,4 +112,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_IPC_CMD_PARSER_H
#endif // OHOS_DM_IPC_CMD_PARSER_H
@@ -92,4 +92,4 @@ private:
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DM_IPC_CMD_PARSER_H
#endif // OHOS_DM_IPC_CMD_PARSER_H