mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
Merge branch 'master' of https://gitee.com/gritking/ability_dmsfwk
Signed-off-by: MisterE <smart_e@126.com>
This commit is contained in:
commit
302521c3e4
@ -52,7 +52,6 @@ public:
|
||||
std::string destBundleName_ = "";
|
||||
std::string destModuleName_ = "";
|
||||
std::string destAbilityName_ = "";
|
||||
std::string developerId_ = "";
|
||||
DSchedEventType dSchedEventType_ = DMS_UNKNOW;
|
||||
DSchedEventState state_ = DMS_DSCHED_EVENT_INIT;
|
||||
};
|
||||
|
@ -51,13 +51,13 @@ public:
|
||||
const AccountInfo& accountInfo, AppExecFwk::AbilityInfo& targetAbility);
|
||||
bool IsFoundationCall() const;
|
||||
bool IsSceneBoardCall() const;
|
||||
int32_t CheckPermission(uint32_t accessToken, const std::string& permissionName) const;
|
||||
int32_t CheckPermission(uint32_t accessToken, const std::string& permissionName) const;Z
|
||||
int32_t CheckPermissionAll(uint32_t accessToken, const std::string& permissionName) const;
|
||||
int32_t GetAccountInfo(const std::string& remoteNetworkId, const CallerInfo& callerInfo,
|
||||
AccountInfo& accountInfo);
|
||||
bool GetTargetAbility(const AAFwk::Want& want, AppExecFwk::AbilityInfo& targetAbility,
|
||||
bool needQueryExtension = false) const;
|
||||
bool isSameAppIdOrDeveloperId(const CallerInfo &callerInfo, const AppExecFwk::AbilityInfo &targetAbility);
|
||||
bool isSameAppIdOrDeveloperId(const CallerInfo &callerInfo, const AppExecFwk::AbilityInfo &targetAbility) const;
|
||||
void MarkUriPermission(OHOS::AAFwk::Want& want, uint32_t accessToken);
|
||||
void RemoveRemoteObjectFromWant(std::shared_ptr<AAFwk::Want> want) const;
|
||||
|
||||
|
@ -45,7 +45,6 @@ struct ContinueEventInfo {
|
||||
std::string bundleName;
|
||||
std::string moduleName;
|
||||
std::string abilityName;
|
||||
std::string developerId;
|
||||
};
|
||||
|
||||
class DmsBmStorage {
|
||||
|
@ -61,7 +61,6 @@ struct DmsBundleInfo : public Parcelable {
|
||||
// bundle update time
|
||||
int64_t updateTime = 0;
|
||||
std::string developerId;
|
||||
std::vector<std::string> continueBundle;
|
||||
std::vector<DmsAbilityInfo> dmsAbilityInfos;
|
||||
std::vector<uint8_t> userIdArr;
|
||||
|
||||
|
@ -281,7 +281,6 @@ int32_t DSchedContinuation::NotifyDSchedEventForOneCB(const sptr<IRemoteObject>
|
||||
PARCEL_WRITE_HELPER_RET(data, String, continueEvent_.destBundleName_, SEND_REQUEST_DEF_FAIL);
|
||||
PARCEL_WRITE_HELPER_RET(data, String, continueEvent_.destModuleName_, SEND_REQUEST_DEF_FAIL);
|
||||
PARCEL_WRITE_HELPER_RET(data, String, continueEvent_.destAbilityName_, SEND_REQUEST_DEF_FAIL);
|
||||
PARCEL_WRITE_HELPER_RET(data, String, continueEvent_.developerId_, SEND_REQUEST_DEF_FAIL);
|
||||
PARCEL_WRITE_HELPER_RET(data, Int32, continueEvent_.dSchedEventType_, SEND_REQUEST_DEF_FAIL);
|
||||
PARCEL_WRITE_HELPER_RET(data, Int32, continueEvent_.state_, SEND_REQUEST_DEF_FAIL);
|
||||
|
||||
|
@ -336,7 +336,7 @@ bool DistributedSchedPermission::GetTargetAbility(const AAFwk::Want& want,
|
||||
}
|
||||
|
||||
bool DistributedSchedPermission::isSameAppIdOrDeveloperId(const CallerInfo &callerInfo,
|
||||
const AppExecFwk::AbilityInfo &targetAbility)
|
||||
const AppExecFwk::AbilityInfo &targetAbility) const
|
||||
{
|
||||
if (targetAbility.bundleName == callerInfo.callerBundleName &&
|
||||
!BundleManagerInternal::IsSameAppId(callerInfo.callerAppId, targetAbility.bundleName)) {
|
||||
|
@ -36,7 +36,6 @@ const std::string JSON_KEY_ENABLED = "enabled";
|
||||
const std::string JSON_KEY_BUNDLE_NAME_ID = "bundleNameId";
|
||||
const std::string JSON_KEY_UPDATE_TIME = "updateTime";
|
||||
const std::string JSON_KEY_DEVELOPER_ID = "developerId";
|
||||
const std::string JSON_KEY_CONTINUE_BUNDLE = "continueBundle";
|
||||
const std::string JSON_KEY_DMS_ABILITY_INFOS = "dmsAbilityInfos";
|
||||
const std::string JSON_KEY_DMS_ABILITY_NAME = "abilityName";
|
||||
const std::string JSON_KEY_DMS_CONTINUETYPE = "continueType";
|
||||
@ -226,6 +225,7 @@ bool DmsBundleInfo::ReadFromParcel(Parcel &parcel)
|
||||
enabled = parcel.ReadBool();
|
||||
bundleNameId = parcel.ReadUint16();
|
||||
updateTime = parcel.ReadInt64();
|
||||
developerId = Str16ToStr8(parcel.ReadString16());
|
||||
uint32_t abilityInfosSize;
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, abilityInfosSize);
|
||||
CONTAINER_SECURITY_VERIFY(parcel, abilityInfosSize, &dmsAbilityInfos);
|
||||
@ -294,7 +294,6 @@ std::string DmsBundleInfo::ToString() const
|
||||
jsonObject[JSON_KEY_BUNDLE_NAME_ID] = bundleNameId;
|
||||
jsonObject[JSON_KEY_UPDATE_TIME] = updateTime;
|
||||
jsonObject[JSON_KEY_DEVELOPER_ID] = developerId;
|
||||
jsonObject[JSON_KEY_CONTINUE_BUNDLE] = continueBundle;
|
||||
jsonObject[JSON_KEY_DMS_ABILITY_INFOS] = dmsAbilityInfos;
|
||||
jsonObject[JSON_KEY_DMS_USERID] = userIdArr;
|
||||
return jsonObject.dump();
|
||||
@ -333,8 +332,6 @@ bool DmsBundleInfo::FromJsonString(const std::string &jsonString)
|
||||
JsonType::NUMBER, false, parseResult, ArrayType::NOT_ARRAY);
|
||||
GetValueIfFindKey<std::string>(jsonObject, jsonObjectEnd, JSON_KEY_DEVELOPER_ID, developerId,
|
||||
JsonType::STRING, false, parseResult, ArrayType::NOT_ARRAY);
|
||||
GetValueIfFindKey<std::string>(jsonObject, jsonObjectEnd, JSON_KEY_CONTINUE_BUNDLE, continueBundle,
|
||||
JsonType::STRING, false, parseResult, ArrayType::NOT_ARRAY);
|
||||
GetValueIfFindKey<std::vector<DmsAbilityInfo>>(jsonObject, jsonObjectEnd, JSON_KEY_DMS_ABILITY_INFOS,
|
||||
dmsAbilityInfos, JsonType::ARRAY, false, parseResult, ArrayType::OBJECT);
|
||||
GetValueIfFindKey<std::vector<uint8_t>>(jsonObject, jsonObjectEnd, JSON_KEY_DMS_USERID, userIdArr,
|
||||
|
@ -336,7 +336,7 @@ int32_t DMSContinueRecvMgr::DealOnBroadcastBusiness(const std::string &senderNet
|
||||
HILOGE("The app is not installed on the local device.");
|
||||
return INVALID_PARAMETERS_ERR;
|
||||
}
|
||||
currentIconInfo lastRecvInfo = currentIconInfo(senderNetworkId, bundleName, finalBundleName)
|
||||
currentIconInfo lastRecvInfo = currentIconInfo(senderNetworkId, bundleName, finalBundleName);
|
||||
pushLatRecvCache(lastRecvInfo);
|
||||
|
||||
if (localBundleInfo.applicationInfo.bundleType != AppExecFwk::BundleType::APP) {
|
||||
|
Loading…
Reference in New Issue
Block a user