diff --git a/services/abilitymgr/src/utils/update_caller_info_util.cpp b/services/abilitymgr/src/utils/update_caller_info_util.cpp index 7413985adabd3fcb9bfa9116afbd6658a6a957ee..dc559e04faa6657e5272a839e6b8bd8334873a85 100644 --- a/services/abilitymgr/src/utils/update_caller_info_util.cpp +++ b/services/abilitymgr/src/utils/update_caller_info_util.cpp @@ -42,6 +42,13 @@ constexpr const char* PARAM_RESV_ANCO_CALLER_BUNDLENAME = "ohos.anco.param.calle constexpr const char* WANT_PARAMS_APP_RESTART_FLAG = "ohos.aafwk.app.restart"; constexpr const char* CALLER_REQUEST_CODE = "ohos.extra.param.key.callerRequestCode"; constexpr const char* IS_SHELL_CALL = "isShellCall"; +constexpr const char* COMPONENT_STARTUP_NEW_RULES = "component.startup.newRules"; + +void ClearProtectedWantParam(Want &want) +{ + want.RemoveParam(Want::PARAM_RESV_CALLER_NATIVE_NAME); + want.RemoveParam(COMPONENT_STARTUP_NEW_RULES); +} } UpdateCallerInfoUtil &UpdateCallerInfoUtil::GetInstance() @@ -58,6 +65,7 @@ void UpdateCallerInfoUtil::UpdateCallerInfo(Want& want, const sptr(IPCSkeleton::GetCallingTokenID()); int32_t callerUid = IPCSkeleton::GetCallingUid(); int32_t callerPid = IPCSkeleton::GetCallingPid(); @@ -85,7 +93,6 @@ void UpdateCallerInfoUtil::UpdateCallerInfo(Want& want, const sptrGetApplicationInfo().accessTokenId; int32_t callerUid = abilityRecord->GetUid(); int32_t callerPid = abilityRecord->GetPid();