mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-11-23 15:20:34 +00:00
Issue:#I6A12D
Signed-off-by: zhoushicheng <zhoushicheng2@huawei.com> Change-Id: I65301933da89d529dee6e524e339f1c31952ae89
This commit is contained in:
parent
c3ce073571
commit
463fd6d5d4
@ -334,6 +334,7 @@ void Ability::OnActive()
|
||||
eventInfo.bundleName = abilityInfo_->bundleName;
|
||||
eventInfo.moduleName = abilityInfo_->moduleName;
|
||||
eventInfo.abilityName = abilityInfo_->name;
|
||||
eventInfo.abilityType = static_cast<int32_t>(abilityInfo_->type);
|
||||
AAFwk::EventReport::SendAbilityEvent(AAFwk::EventName::ABILITY_ONACTIVE,
|
||||
HiSysEventType::BEHAVIOR, eventInfo);
|
||||
HILOG_DEBUG("%{public}s end.", __func__);
|
||||
|
@ -139,6 +139,7 @@ ABILITY_ONACTIVE:
|
||||
BUNDLE_NAME: {type: STRING, desc: bundle name}
|
||||
MODULE_NAME: {type: STRING, desc: module name}
|
||||
ABILITY_NAME: {type: STRING, desc: ability name}
|
||||
ABILITY_TYPE: {type: INT32, desc: ability type}
|
||||
|
||||
ABILITY_ONINACTIVE:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, desc: ability onInactive}
|
||||
@ -154,7 +155,7 @@ START_SERVICE:
|
||||
BUNDLE_NAME: {type: STRING, desc: bundle name}
|
||||
MODULE_NAME: {type: STRING, desc: module name}
|
||||
ABILITY_NAME: {type: STRING, desc: ability name}
|
||||
EXTENSION_TYPE: {type: STRING, desc: extension type}
|
||||
EXTENSION_TYPE: {type: INT32, desc: extension type}
|
||||
|
||||
STOP_SERVICE:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, tag: ability, desc: stop serviceExtensionAbility}
|
||||
@ -162,7 +163,7 @@ STOP_SERVICE:
|
||||
BUNDLE_NAME: {type: STRING, desc: bundle name}
|
||||
MODULE_NAME: {type: STRING, desc: module name}
|
||||
ABILITY_NAME: {type: STRING, desc: ability name}
|
||||
EXTENSION_TYPE: {type: STRING, desc: extension type}
|
||||
EXTENSION_TYPE: {type: INT32, desc: extension type}
|
||||
|
||||
CONNECT_SERVICE:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, tag: ability, desc: connect serviceAbility}
|
||||
|
@ -38,6 +38,7 @@ struct EventInfo {
|
||||
std::string moduleName;
|
||||
std::string abilityName;
|
||||
std::string processName;
|
||||
int32_t abilityType = -1;
|
||||
};
|
||||
|
||||
enum class EventName {
|
||||
|
@ -30,6 +30,7 @@ const std::string EVENT_KEY_ERROR_CODE = "ERROR_CODE";
|
||||
const std::string EVENT_KEY_BUNDLE_NAME = "BUNDLE_NAME";
|
||||
const std::string EVENT_KEY_MODULE_NAME = "MODULE_NAME";
|
||||
const std::string EVENT_KEY_ABILITY_NAME = "ABILITY_NAME";
|
||||
const std::string EVENT_KEY_ABILITY_TYPE = "ABILITY_TYPE";
|
||||
const std::string EVENT_KEY_VERSION_NAME = "VERSION_NAME";
|
||||
const std::string EVENT_KEY_VERSION_CODE = "VERSION_CODE";
|
||||
const std::string EVENT_KEY_PROCESS_NAME = "PROCESS_NAME";
|
||||
@ -132,7 +133,6 @@ void EventReport::SendAbilityEvent(const EventName &eventName, HiSysEventType ty
|
||||
break;
|
||||
case EventName::ABILITY_ONFOREGROUND:
|
||||
case EventName::ABILITY_ONBACKGROUND:
|
||||
case EventName::ABILITY_ONACTIVE:
|
||||
case EventName::ABILITY_ONINACTIVE:
|
||||
HiSysEventWrite(
|
||||
HiSysEvent::Domain::AAFWK,
|
||||
@ -142,6 +142,16 @@ void EventReport::SendAbilityEvent(const EventName &eventName, HiSysEventType ty
|
||||
EVENT_KEY_MODULE_NAME, eventInfo.moduleName,
|
||||
EVENT_KEY_ABILITY_NAME, eventInfo.abilityName);
|
||||
break;
|
||||
case EventName::ABILITY_ONACTIVE:
|
||||
HiSysEventWrite(
|
||||
HiSysEvent::Domain::AAFWK,
|
||||
name,
|
||||
type,
|
||||
EVENT_KEY_BUNDLE_NAME, eventInfo.bundleName,
|
||||
EVENT_KEY_MODULE_NAME, eventInfo.moduleName,
|
||||
EVENT_KEY_ABILITY_NAME, eventInfo.abilityName,
|
||||
EVENT_KEY_ABILITY_TYPE, eventInfo.abilityType);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user