mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
84c9bcd91c
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Mar 31 22:24:58 2026 +0800 # # On branch publish_startuiability_0331 # Your branch is up to date with 'origin/publish_startuiability_0331'. # # Changes to be committed: # modified: frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp # modified: interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h # modified: services/abilitymgr/include/utils/ability_event_util.h # modified: services/abilitymgr/src/ability_record.cpp # modified: services/abilitymgr/src/utils/ability_event_util.cpp # modified: test/fuzztest/abilityeventutil_fuzzer/BUILD.gn # modified: test/mock/services_abilitymgr_test/libs/appexecfwk_core/include/bundlemgr/mock_bundle_manager.h # modified: test/unittest/ability_event_util_test/BUILD.gn # modified: test/unittest/ability_event_util_test/ability_event_util_test.cpp # modified: test/unittest/ability_manager_service_first_test/ability_manager_service_first_test.cpp # modified: test/unittest/ability_manager_service_mock_test/BUILD.gn # modified: test/unittest/insight_intent/insight_intent_utils_test/BUILD.gn # # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Mar 31 22:24:58 2026 +0800 # # On branch publish_startuiability_0331 # Your branch is up to date with 'origin/publish_startuiability_0331'. # # Changes to be committed: # modified: frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp # modified: interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h # modified: services/abilitymgr/include/utils/ability_event_util.h # modified: services/abilitymgr/src/ability_record.cpp # modified: services/abilitymgr/src/utils/ability_event_util.cpp # modified: test/fuzztest/abilityeventutil_fuzzer/BUILD.gn # modified: test/mock/services_abilitymgr_test/libs/appexecfwk_core/include/bundlemgr/mock_bundle_manager.h # modified: test/unittest/ability_event_util_test/BUILD.gn # modified: test/unittest/ability_event_util_test/ability_event_util_test.cpp # modified: test/unittest/ability_manager_service_first_test/ability_manager_service_first_test.cpp # modified: test/unittest/ability_manager_service_mock_test/BUILD.gn # modified: test/unittest/insight_intent/insight_intent_utils_test/BUILD.gn # # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Mar 31 22:24:58 2026 +0800 # # On branch publish_startuiability_0331 # Your branch is up to date with 'origin/publish_startuiability_0331'. # # Changes to be committed: # modified: frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp # modified: interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h # modified: services/abilitymgr/include/utils/ability_event_util.h # modified: services/abilitymgr/src/ability_record.cpp # modified: services/abilitymgr/src/utils/ability_event_util.cpp # modified: test/fuzztest/abilityeventutil_fuzzer/BUILD.gn # modified: test/mock/services_abilitymgr_test/libs/appexecfwk_core/include/bundlemgr/mock_bundle_manager.h # modified: test/unittest/ability_event_util_test/BUILD.gn # modified: test/unittest/ability_event_util_test/ability_event_util_test.cpp # modified: test/unittest/ability_manager_service_first_test/ability_manager_service_first_test.cpp # modified: test/unittest/ability_manager_service_mock_test/BUILD.gn # modified: test/unittest/insight_intent/insight_intent_utils_test/BUILD.gn # # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Mar 31 22:24:58 2026 +0800 # # On branch publish_startuiability_0331 # Your branch is up to date with 'origin/publish_startuiability_0331'. # # Changes to be committed: # modified: frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp # modified: interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h # modified: services/abilitymgr/include/utils/ability_event_util.h # modified: services/abilitymgr/src/ability_record.cpp # modified: services/abilitymgr/src/utils/ability_event_util.cpp # modified: test/fuzztest/abilityeventutil_fuzzer/BUILD.gn # modified: test/mock/services_abilitymgr_test/libs/appexecfwk_core/include/bundlemgr/mock_bundle_manager.h # modified: test/unittest/ability_event_util_test/BUILD.gn # modified: test/unittest/ability_event_util_test/ability_event_util_test.cpp # modified: test/unittest/ability_manager_service_first_test/ability_manager_service_first_test.cpp # modified: test/unittest/ability_manager_service_mock_test/BUILD.gn # modified: test/unittest/insight_intent/insight_intent_utils_test/BUILD.gn # # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Mar 31 22:24:58 2026 +0800 # # On branch publish_startuiability_0331 # Your branch is up to date with 'origin/publish_startuiability_0331'. # # Changes to be committed: # modified: frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp # modified: interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h # modified: services/abilitymgr/include/utils/ability_event_util.h # modified: services/abilitymgr/src/ability_record.cpp # modified: services/abilitymgr/src/utils/ability_event_util.cpp # modified: test/fuzztest/abilityeventutil_fuzzer/BUILD.gn # modified: test/mock/services_abilitymgr_test/libs/appexecfwk_core/include/bundlemgr/mock_bundle_manager.h # modified: test/unittest/ability_event_util_test/BUILD.gn # modified: test/unittest/ability_event_util_test/ability_event_util_test.cpp # modified: test/unittest/ability_manager_service_first_test/ability_manager_service_first_test.cpp # modified: test/unittest/ability_manager_service_mock_test/BUILD.gn # modified: test/unittest/insight_intent/insight_intent_utils_test/BUILD.gn #
51 lines
1.9 KiB
C++
51 lines
1.9 KiB
C++
/*
|
|
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef OHOS_ABILITY_RUNTIME_ABILITY_EVENT_UTIL_H
|
|
#define OHOS_ABILITY_RUNTIME_ABILITY_EVENT_UTIL_H
|
|
|
|
#include <string>
|
|
|
|
#include "application_info.h"
|
|
#include "bundle_pack_info.h"
|
|
#include "event_report.h"
|
|
#include "ffrt.h"
|
|
|
|
namespace OHOS {
|
|
namespace AAFwk {
|
|
|
|
class AbilityEventUtil {
|
|
public:
|
|
static void HandleModuleInfoUpdated(const std::string &bundleName, const int uid, const std::string &moduleName,
|
|
bool isPlugin);
|
|
static void SendStartAbilityErrorEvent(EventInfo &eventInfo, int32_t errCode, const std::string errMsg,
|
|
bool isSystemError = false);
|
|
static void SendKillProcessWithReasonEvent(int32_t errCode, const std::string &errMsg, EventInfo &eventInfo);
|
|
|
|
/**
|
|
* @brief Handle bundle first launch event publishing and status setting.
|
|
* @param appInfo The application info containing bundle information.
|
|
* @param userId The user ID.
|
|
* @param callerBundleName The caller bundle name (optional, empty string if none).
|
|
* @return Returns true if the event was published successfully; returns false otherwise.
|
|
*/
|
|
static bool HandleBundleFirstLaunch(const AppExecFwk::ApplicationInfo &appInfo, int32_t userId,
|
|
const std::string &callerBundleName = "");
|
|
};
|
|
|
|
} // namespace AAFwk
|
|
} // namespace OHOS
|
|
#endif // OHOS_ABILITY_RUNTIME_ABILITY_EVENT_UTIL_H
|