mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
!76 change connection callback interface token
Merge pull request !76 from Gymee/master
This commit is contained in:
commit
54e95dfb25
@ -22,12 +22,16 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace DistributedSchedule {
|
||||
namespace {
|
||||
const std::u16string CONNECTION_CALLBACK_INTERFACE_TOKEN = u"ohos.abilityshell.DistributedConnection";
|
||||
}
|
||||
|
||||
void AbilityConnectionWrapperProxy::OnAbilityConnectDone(const AppExecFwk::ElementName& element,
|
||||
const sptr<IRemoteObject>& remoteObject, int32_t resultCode)
|
||||
{
|
||||
HILOGD("AbilityConnectionWrapperProxy::OnAbilityConnectDone called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IAbilityConnection::GetDescriptor())) {
|
||||
if (!data.WriteInterfaceToken(CONNECTION_CALLBACK_INTERFACE_TOKEN)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -45,7 +49,7 @@ void AbilityConnectionWrapperProxy::OnAbilityDisconnectDone(const AppExecFwk::El
|
||||
{
|
||||
HILOGD("AbilityConnectionWrapperProxy::OnAbilityDisconnectDone called");
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IAbilityConnection::GetDescriptor())) {
|
||||
if (!data.WriteInterfaceToken(CONNECTION_CALLBACK_INTERFACE_TOKEN)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,8 @@ using namespace AAFwk;
|
||||
using namespace AppExecFwk;
|
||||
|
||||
namespace {
|
||||
const std::u16string CONNECTION_CALLBACK_INTERFACE_TOKEN = u"ohos.abilityshell.DistributedConnection";
|
||||
|
||||
constexpr int32_t BIND_CONNECT_RETRY_TIMES = 3;
|
||||
constexpr int32_t BIND_CONNECT_TIMEOUT = 500; // 500ms
|
||||
constexpr int32_t MAX_DISTRIBUTED_CONNECT_NUM = 600;
|
||||
@ -690,7 +692,7 @@ int32_t DistributedSchedService::NotifyApp(const sptr<IRemoteObject>& connect,
|
||||
return OBJECT_NULL;
|
||||
}
|
||||
MessageParcel data;
|
||||
if (!data.WriteInterfaceToken(IAbilityConnection::GetDescriptor())) {
|
||||
if (!data.WriteInterfaceToken(CONNECTION_CALLBACK_INTERFACE_TOKEN)) {
|
||||
return ERR_FLATTEN_OBJECT;
|
||||
}
|
||||
PARCEL_WRITE_HELPER(data, Parcelable, &element);
|
||||
|
Loading…
Reference in New Issue
Block a user