mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-02 12:37:24 +00:00
!10367 [Bugfix]对拉起方是否为uiability的判断有误
Merge pull request !10367 from 张亚菲/zyf0905
This commit is contained in:
commit
dcef71f98f
@ -9503,13 +9503,18 @@ bool AbilityManagerService::CheckUIExtensionCallerIsForeground(const AbilityRequ
|
||||
bool AbilityManagerService::CheckUIExtensionCallerIsUIAbility(const AbilityRequest &abilityRequest)
|
||||
{
|
||||
auto callerAbility = Token::GetAbilityRecordByToken(abilityRequest.callerToken);
|
||||
if (callerAbility == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::UI_EXT, "caller ability invalid");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (callerAbility->GetAbilityInfo().type == AppExecFwk::AbilityType::PAGE) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (UIExtensionUtils::IsUIExtension(callerAbility->GetAbilityInfo().extensionAbilityType)) {
|
||||
auto callerability = GetUIExtensionRootCaller(abilityRequest.callerToken, abilityRequest.userId);
|
||||
if (callerAbility->GetAbilityInfo().type == AppExecFwk::AbilityType::PAGE) {
|
||||
callerAbility = GetUIExtensionRootCaller(abilityRequest.callerToken, abilityRequest.userId);
|
||||
if (callerAbility != nullptr && callerAbility->GetAbilityInfo().type == AppExecFwk::AbilityType::PAGE) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user