mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-11-27 01:10:52 +00:00
commit
6464f01db2
@ -1417,10 +1417,8 @@ WantParams *WantParams::Unmarshalling(Parcel &parcel)
|
||||
|
||||
void WantParams::DumpInfo(int level) const
|
||||
{
|
||||
int typeId = VALUE_TYPE_NULL;
|
||||
for (auto it : params_) {
|
||||
typeId = VALUE_TYPE_NULL;
|
||||
typeId = WantParams::GetDataType(it.second);
|
||||
int typeId = WantParams::GetDataType(it.second);
|
||||
if (typeId != VALUE_TYPE_NULL) {
|
||||
std::string value = WantParams::GetStringByType(it.second, typeId);
|
||||
ABILITYBASE_LOGI("=WantParams[%{public}s]:%{private}s =======", it.first.c_str(), value.c_str());
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "form_timer_option.h"
|
||||
#include "form_util.h"
|
||||
#include "hilog_wrapper.h"
|
||||
#include "in_process_call_wrapper.h"
|
||||
#ifdef OS_ACCOUNT_PART_ENABLED
|
||||
#include "os_account_manager.h"
|
||||
#endif // OS_ACCOUNT_PART_ENABLED
|
||||
@ -930,7 +931,7 @@ std::shared_ptr<WantAgent> FormTimerMgr::GetUpdateAtWantAgent(long updateAtTime,
|
||||
wants.emplace_back(want);
|
||||
WantAgentInfo wantAgentInfo(REQUEST_UPDATE_AT_CODE, WantAgentConstant::OperationType::SEND_COMMON_EVENT,
|
||||
WantAgentConstant::Flags::UPDATE_PRESENT_FLAG, wants, nullptr);
|
||||
return WantAgentHelper::GetWantAgent(wantAgentInfo, userId);
|
||||
return IN_PROCESS_CALL(WantAgentHelper::GetWantAgent(wantAgentInfo, userId));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1043,7 +1044,7 @@ std::shared_ptr<WantAgent> FormTimerMgr::GetLimiterWantAgent()
|
||||
wants.emplace_back(want);
|
||||
WantAgentInfo wantAgentInfo(REQUEST_LIMITER_CODE, WantAgentConstant::OperationType::SEND_COMMON_EVENT,
|
||||
WantAgentConstant::Flags::UPDATE_PRESENT_FLAG, wants, nullptr);
|
||||
return WantAgentHelper::GetWantAgent(wantAgentInfo);
|
||||
return IN_PROCESS_CALL(WantAgentHelper::GetWantAgent(wantAgentInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1118,7 +1119,7 @@ std::shared_ptr<WantAgent> FormTimerMgr::GetDynamicWantAgent(int64_t nextTime, i
|
||||
wants.emplace_back(want);
|
||||
WantAgentInfo wantAgentInfo(REQUEST_DYNAMIC_CODE, WantAgentConstant::OperationType::SEND_COMMON_EVENT,
|
||||
WantAgentConstant::Flags::UPDATE_PRESENT_FLAG, wants, nullptr);
|
||||
return WantAgentHelper::GetWantAgent(wantAgentInfo, userId);
|
||||
return IN_PROCESS_CALL(WantAgentHelper::GetWantAgent(wantAgentInfo, userId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -409,12 +409,10 @@ void FormExtensionProviderClient::NotifyFormExtensionAcquireState(const Want &wa
|
||||
const sptr<IRemoteObject> &callerToken)
|
||||
{
|
||||
HILOG_INFO("%{public}s called.", __func__);
|
||||
int errorCode = ERR_OK;
|
||||
FormState state = FormState::UNKNOWN;
|
||||
std::shared_ptr<FormExtension> ownerFormExtension = GetOwner();
|
||||
if (ownerFormExtension == nullptr) {
|
||||
HILOG_ERROR("%{public}s error, ownerFormExtension is nullptr.", __func__);
|
||||
errorCode = ERR_APPEXECFWK_FORM_NO_SUCH_ABILITY;
|
||||
} else {
|
||||
state = ownerFormExtension->OnAcquireFormState(wantArg);
|
||||
}
|
||||
|
@ -406,6 +406,7 @@ PendingWant *PendingWant::Unmarshalling(Parcel &parcel)
|
||||
}
|
||||
sptr<AAFwk::IWantSender> target = iface_cast<AAFwk::IWantSender>(parcel.ReadObject<IRemoteObject>());
|
||||
if (target == nullptr) {
|
||||
delete pendingWant;
|
||||
return nullptr;
|
||||
}
|
||||
pendingWant->SetTarget(target);
|
||||
|
@ -488,7 +488,7 @@ ErrCode AbilityManagerShellCommand::RunAsDumpsysCommand()
|
||||
// 'aa dump -i 10 -element -lastpage'
|
||||
// 'aa dump -i 10 -render -lastpage'
|
||||
// 'aa dump -i 10 -layer'
|
||||
if (strcmp(optarg, "astpage") && strcmp(optarg, "ayer")) {
|
||||
if ((optarg != nullptr) && strcmp(optarg, "astpage") && strcmp(optarg, "ayer")) {
|
||||
result = OHOS::ERR_INVALID_VALUE;
|
||||
resultReceiver_.append(HELP_MSG_DUMPSYS);
|
||||
return result;
|
||||
@ -510,7 +510,7 @@ ErrCode AbilityManagerShellCommand::RunAsDumpsysCommand()
|
||||
}
|
||||
} else {
|
||||
// 'aa dumpsys -i 10 -inspector'
|
||||
if (strcmp(optarg, "nspector")) {
|
||||
if ((optarg != nullptr) && strcmp(optarg, "nspector")) {
|
||||
result = OHOS::ERR_INVALID_VALUE;
|
||||
resultReceiver_.append(HELP_MSG_DUMPSYS);
|
||||
return result;
|
||||
@ -525,7 +525,7 @@ ErrCode AbilityManagerShellCommand::RunAsDumpsysCommand()
|
||||
isfirstCommand = true;
|
||||
} else {
|
||||
// 'aa dumpsys -i 10 -element'
|
||||
if (strcmp(optarg, "lement")) {
|
||||
if ((optarg != nullptr) && strcmp(optarg, "lement")) {
|
||||
result = OHOS::ERR_INVALID_VALUE;
|
||||
resultReceiver_.append(HELP_MSG_DUMPSYS);
|
||||
return result;
|
||||
@ -554,7 +554,8 @@ ErrCode AbilityManagerShellCommand::RunAsDumpsysCommand()
|
||||
// 'aa dump -i 10 -render'
|
||||
// 'aa dump -i 10 -rotation'
|
||||
// 'aa dump -i 10 -frontend'
|
||||
if (strcmp(optarg, "ender") && strcmp(optarg, "otation") && strcmp(optarg, "ontend")) {
|
||||
if ((optarg != nullptr) && strcmp(optarg, "ender") && strcmp(optarg, "otation") &&
|
||||
strcmp(optarg, "ontend")) {
|
||||
result = OHOS::ERR_INVALID_VALUE;
|
||||
resultReceiver_.append(HELP_MSG_DUMPSYS);
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user