mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-11-27 09:21:28 +00:00
commit
1e6440c012
@ -955,6 +955,7 @@ void ContextImpl::SubscribeToOverlayEvents(std::shared_ptr<Global::Resource::Res
|
||||
const std::string &name, const std::string &hapModuleName, std::string &loadPath,
|
||||
std::vector<AppExecFwk::OverlayModuleInfo> overlayModuleInfos)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(overlaySubscriberMutex_);
|
||||
if (overlaySubscriber_ != nullptr) {
|
||||
return;
|
||||
}
|
||||
@ -976,6 +977,7 @@ void ContextImpl::SubscribeToOverlayEvents(std::shared_ptr<Global::Resource::Res
|
||||
|
||||
void ContextImpl::UnsubscribeToOverlayEvents()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(overlaySubscriberMutex_);
|
||||
if (overlaySubscriber_ != nullptr) {
|
||||
EventFwk::CommonEventManager::UnSubscribeCommonEvent(overlaySubscriber_);
|
||||
overlaySubscriber_ = nullptr;
|
||||
|
@ -495,6 +495,7 @@ private:
|
||||
// False: no need to get a new fms remote object.
|
||||
volatile bool resetFlag_ = false;
|
||||
|
||||
std::mutex overlaySubscriberMutex_;
|
||||
std::shared_ptr<AppExecFwk::OverlayEventSubscriber> overlaySubscriber_;
|
||||
};
|
||||
} // namespace AbilityRuntime
|
||||
|
@ -8120,6 +8120,10 @@ bool AppMgrServiceInner::IsProcessContainsOnlyUIAbility(const pid_t pid)
|
||||
void AppMgrServiceInner::MakeIsolateSandBoxProcessName(const std::shared_ptr<AbilityInfo> &abilityInfo,
|
||||
const HapModuleInfo &hapModuleInfo, std::string &processName) const
|
||||
{
|
||||
if (abilityInfo == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "abilityInfo nullptr");
|
||||
return;
|
||||
}
|
||||
auto type = abilityInfo->type;
|
||||
auto extensionType = abilityInfo->extensionAbilityType;
|
||||
if (type != AppExecFwk::AbilityType::EXTENSION ||
|
||||
@ -8127,10 +8131,13 @@ void AppMgrServiceInner::MakeIsolateSandBoxProcessName(const std::shared_ptr<Abi
|
||||
extensionType == AppExecFwk::ExtensionAbilityType::SERVICE) {
|
||||
return;
|
||||
}
|
||||
for (auto extensionInfo: hapModuleInfo.extensionInfos) {
|
||||
if (extensionInfo.name == abilityInfo->name && extensionInfo.needCreateSandbox) {
|
||||
for (const auto& extensionInfo: hapModuleInfo.extensionInfos) {
|
||||
if (extensionInfo.name == abilityInfo->name) {
|
||||
if (extensionInfo.needCreateSandbox) {
|
||||
processName = (processName + ":" + abilityInfo->name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user