mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2025-01-06 19:50:29 +00:00
Signed-off-by: caochunlei <caochunlei1@huawei.com>
This commit is contained in:
parent
117e5af1f2
commit
fa07cd699d
@ -30,7 +30,11 @@ enum {
|
||||
/**
|
||||
* Module type: ABility Kit side
|
||||
*/
|
||||
ABILITY_MODULE_TYPE_KIT = 1
|
||||
ABILITY_MODULE_TYPE_KIT = 1,
|
||||
/**
|
||||
* Module type: Ability connection state kit side
|
||||
*/
|
||||
ABILITY_MODULE_TYPE_CONNECTION_STATE_KIT = 2
|
||||
};
|
||||
|
||||
// offset of aafwk error, only be used in this file.
|
||||
|
@ -43,14 +43,14 @@ struct DlpStateData : public Parcelable {
|
||||
*/
|
||||
static DlpStateData *Unmarshalling(Parcel &inParcel);
|
||||
|
||||
int32_t targetPid = -1;
|
||||
int32_t targetPid = 0;
|
||||
int32_t targetUid = 0;
|
||||
std::string targetBundleName;
|
||||
std::string targetModuleName;
|
||||
std::string targetAbilityName;
|
||||
int32_t dlpUid;
|
||||
int32_t dlpPid;
|
||||
std::string dlpBundleName;
|
||||
int32_t callerUid = 0;
|
||||
int32_t callerPid = 0;
|
||||
std::string callerName;
|
||||
};
|
||||
} // namespace AbilityRuntime
|
||||
} // namespace OHOS
|
||||
|
@ -41,15 +41,15 @@ bool DlpStateData::Marshalling(Parcel &parcel) const
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!parcel.WriteInt32(dlpUid)) {
|
||||
if (!parcel.WriteInt32(callerUid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!parcel.WriteInt32(dlpPid)) {
|
||||
if (!parcel.WriteInt32(callerPid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!parcel.WriteString16(Str8ToStr16(dlpBundleName))) {
|
||||
if (!parcel.WriteString16(Str8ToStr16(callerName))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -82,18 +82,18 @@ bool DlpStateData::ReadFromParcel(Parcel &parcel)
|
||||
}
|
||||
targetAbilityName = Str16ToStr8(strValue);
|
||||
|
||||
if (!parcel.ReadInt32(dlpUid)) {
|
||||
if (!parcel.ReadInt32(callerUid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!parcel.ReadInt32(dlpPid)) {
|
||||
if (!parcel.ReadInt32(callerPid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!parcel.ReadString16(strValue)) {
|
||||
return false;
|
||||
}
|
||||
dlpBundleName = Str16ToStr8(strValue);
|
||||
callerName = Str16ToStr8(strValue);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ bool DlpStateItem::HandleDlpConnectionState(const std::shared_ptr<AbilityRecord>
|
||||
void DlpStateItem::GenerateDlpStateData(
|
||||
const std::shared_ptr<AbilityRecord> &dlpAbility, AbilityRuntime::DlpStateData &dlpData)
|
||||
{
|
||||
dlpData.dlpUid = dlpUid_;
|
||||
dlpData.dlpPid = dlpPid_;
|
||||
dlpData.dlpBundleName = DLP_BUNDLE_NAME;
|
||||
dlpData.callerUid = dlpUid_;
|
||||
dlpData.callerPid = dlpPid_;
|
||||
dlpData.callerName = DLP_BUNDLE_NAME;
|
||||
dlpData.targetPid = dlpAbility->GetPid();
|
||||
dlpData.targetUid = dlpAbility->GetUid();
|
||||
dlpData.targetBundleName = dlpAbility->GetAbilityInfo().bundleName;
|
||||
|
Loading…
Reference in New Issue
Block a user