mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-23 07:09:53 +00:00
删除重复裁剪
Signed-off-by: zhutianyi <zhutianyi2@huawei.com>
This commit is contained in:
parent
e210ac3707
commit
76b1090374
@ -36,7 +36,6 @@ declare_args() {
|
||||
global_resmgr_enable = true
|
||||
hicollie_enable = true
|
||||
hisysevent_enable = true
|
||||
device_usage_enable = true
|
||||
|
||||
if (defined(global_parts_info) &&
|
||||
!defined(global_parts_info.ability_ability_runtime)) {
|
||||
@ -73,7 +72,8 @@ declare_args() {
|
||||
if (defined(global_parts_info) &&
|
||||
(!defined(global_parts_info.powermgr_power_manager_native) ||
|
||||
!defined(global_parts_info.powermgr_battery_manager_native) ||
|
||||
!defined(global_parts_info.powermgr_display_manager_native))) {
|
||||
!defined(global_parts_info.powermgr_display_manager_native) ||
|
||||
!defined(global_parts_info.device_usage_statistics))) {
|
||||
bundle_framework_free_install = false
|
||||
}
|
||||
|
||||
@ -82,11 +82,6 @@ declare_args() {
|
||||
hisysevent_enable = false
|
||||
}
|
||||
|
||||
if (defined(global_parts_info) &&
|
||||
!defined(global_parts_info.device_usage_statistics)) {
|
||||
device_usage_enable = false
|
||||
}
|
||||
|
||||
print("bundle_framework_graphics = " + "$bundle_framework_graphics")
|
||||
print("bundle_framework_free_install = " + "$bundle_framework_free_install")
|
||||
print("bundle_framework_default_app = " + "$bundle_framework_default_app")
|
||||
|
@ -209,13 +209,10 @@ ohos_shared_library("libbms") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
|
||||
|
@ -54,10 +54,8 @@ private:
|
||||
void ProcessEvent(const InnerEvent::Pointer &event) override;
|
||||
bool CheckPrerequisite(AgingTriggertype type) const;
|
||||
bool ReInitAgingRequest(const std::shared_ptr<BundleDataMgr> &dataMgr);
|
||||
#ifdef DEVICE_USAGE_STATISTICS_ENABLE
|
||||
int AgingQueryFormStatistics(std::vector<DeviceUsageStats::BundleActiveModuleRecord>& results,
|
||||
const std::shared_ptr<BundleDataMgr> &dataMgr);
|
||||
#endif
|
||||
void InitAgingTimerInterval();
|
||||
void InitAgingBatteryThresold();
|
||||
|
||||
|
@ -16,9 +16,7 @@
|
||||
|
||||
#include "account_helper.h"
|
||||
#include "battery_srv_client.h"
|
||||
#ifdef DEVICE_USAGE_STATISTICS_ENABLE
|
||||
#include "bundle_active_period_stats.h"
|
||||
#endif
|
||||
#include "bundle_mgr_service.h"
|
||||
#include "bundle_util.h"
|
||||
#include "display_power_mgr_client.h"
|
||||
@ -92,7 +90,6 @@ void BundleAgingMgr::InitAgingtTimer()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEVICE_USAGE_STATISTICS_ENABLE
|
||||
int BundleAgingMgr::AgingQueryFormStatistics(std::vector<DeviceUsageStats::BundleActiveModuleRecord>& results,
|
||||
const std::shared_ptr<BundleDataMgr> &dataMgr)
|
||||
{
|
||||
@ -102,7 +99,6 @@ int BundleAgingMgr::AgingQueryFormStatistics(std::vector<DeviceUsageStats::Bundl
|
||||
APP_LOGD("activeModuleRecord size %{public}zu, ret:%{public}d", results.size(), ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool BundleAgingMgr::ReInitAgingRequest(const std::shared_ptr<BundleDataMgr> &dataMgr)
|
||||
{
|
||||
@ -119,7 +115,6 @@ bool BundleAgingMgr::ReInitAgingRequest(const std::shared_ptr<BundleDataMgr> &da
|
||||
}
|
||||
APP_LOGD("ReInitAgingRequest: removable bundles size %{public}zu", bundleNamesAndUid.size());
|
||||
|
||||
#ifdef DEVICE_USAGE_STATISTICS_ENABLE
|
||||
std::vector<DeviceUsageStats::BundleActiveModuleRecord> activeModuleRecord;
|
||||
int ret = AgingQueryFormStatistics(activeModuleRecord, dataMgr);
|
||||
if (ret != 0) {
|
||||
@ -151,7 +146,6 @@ bool BundleAgingMgr::ReInitAgingRequest(const std::shared_ptr<BundleDataMgr> &da
|
||||
}
|
||||
}
|
||||
request.SetTotalDataBytes(dataMgr->GetAllFreeInstallBundleSpaceSize());
|
||||
#endif
|
||||
return request.SortAgingBundles() > 0;
|
||||
}
|
||||
|
||||
|
@ -482,9 +482,7 @@ void BundleConnectAbilityMgr::GetTargetAbilityInfo(const Want &want, InnerBundle
|
||||
deviceId.empty() * BIT_FOUR + BIT_ONE_FIVE_AZ_DEVICE * BIT_FIVE +
|
||||
!ExistBundleNameInCallingBundles(bundleName, callingBundleNames) * BIT_SIX +
|
||||
BIT_ONE_SEVEN_SAME_BUNDLE * BIT_SEVEN;
|
||||
#ifdef DEVICE_USAGE_STATISTICS_ENABLE
|
||||
targetInfo->callingUid = IPCSkeleton::GetCallingUid();
|
||||
#endif
|
||||
targetInfo->callingAppType = CALLING_TYPE_HARMONY;
|
||||
this->GetCallingInfo(innerBundleInfo, callingBundleNames, callingAppids);
|
||||
targetInfo->callingBundleNames = callingBundleNames;
|
||||
|
@ -106,13 +106,10 @@ ohos_unittest("BmsBundleAccessTokenIdTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -106,13 +106,10 @@ ohos_unittest("BmsBundleCrowdtestingTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -106,13 +106,10 @@ ohos_unittest("BmsBundleDependenciesTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -108,13 +108,10 @@ ohos_unittest("BmsBundleInstallerTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
@ -234,13 +231,10 @@ ohos_unittest("BmsMultipleBundleInstallerTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
|
||||
|
@ -110,13 +110,10 @@ ohos_unittest("BmsBundleKitServiceTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -112,13 +112,10 @@ ohos_unittest("BmsBundlePermissionGrantTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -108,13 +108,10 @@ ohos_unittest("BmsSandboxAppTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -111,13 +111,10 @@ ohos_unittest("BmsBundleUninstallerTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -115,13 +115,10 @@ ohos_unittest("BmsBundleUpdaterTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -103,13 +103,10 @@ ohos_unittest("BmsDataMgrTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -97,13 +97,10 @@ ohos_unittest("BmsServiceBundleScanTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
@ -97,13 +97,10 @@ ohos_unittest("BmsServiceStartupTest") {
|
||||
"ability_runtime:ability_manager",
|
||||
"ability_runtime:app_manager",
|
||||
"battery_manager_native:batterysrv_client",
|
||||
"device_usage_statistics:usagestatsinner",
|
||||
"display_manager_native:displaymgr",
|
||||
"power_manager_native:powermgr_client",
|
||||
]
|
||||
if (device_usage_enable) {
|
||||
external_deps += [ "device_usage_statistics:usagestatsinner" ]
|
||||
defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
|
||||
}
|
||||
defines += [ "BUNDLE_FRAMEWORK_FREE_INSTALL" ]
|
||||
}
|
||||
if (device_manager_enable) {
|
||||
|
Loading…
Reference in New Issue
Block a user