From d959bbba02f9fa38168a103b6a19df680d64bb7e Mon Sep 17 00:00:00 2001 From: zxf Date: Tue, 19 Aug 2025 20:14:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=AE=BE=E5=A4=87=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=97=B6=E9=97=B4=E7=BB=9F=E8=AE=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zxf --- .../include/bundle_active_user_service.h | 6 ++---- .../packageusage/src/bundle_active_user_service.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/services/packageusage/include/bundle_active_user_service.h b/services/packageusage/include/bundle_active_user_service.h index aa825c6..45da2f9 100644 --- a/services/packageusage/include/bundle_active_user_service.h +++ b/services/packageusage/include/bundle_active_user_service.h @@ -114,10 +114,8 @@ private: const std::string& bundleName, const int32_t deletedUid, const int32_t appIndex); void DeleteMemEvent(const std::shared_ptr& currentStats, const std::string& bundleName, const int32_t deletedUid, const int32_t appIndex); - void DeleteMemRecords(const std::shared_ptr& currentStats, const std::string& bundleName, - const int32_t deletedUid, const int32_t appIndex); - void DeleteMemPackageUidSet(const std::shared_ptr& currentStats, - const std::string& bundleName, const int32_t deletedUid, const int32_t appIndex); + void DeleteMemRecords(const std::string& bundleName, const int32_t deletedUid, const int32_t appIndex); + void DeleteMemPackageUidSet(const std::string& bundleName, const int32_t deletedUid, const int32_t appIndex); void UpdateExpiryDate(const bool timeChanged, BundleActiveCalendar& tmpCalendar, const int64_t timeStamp); void UpdatePeriodStats(const BundleActiveEvent& event, const bool& incrementBundleLaunch); }; diff --git a/services/packageusage/src/bundle_active_user_service.cpp b/services/packageusage/src/bundle_active_user_service.cpp index 51cfcdf..8df251d 100644 --- a/services/packageusage/src/bundle_active_user_service.cpp +++ b/services/packageusage/src/bundle_active_user_service.cpp @@ -60,10 +60,10 @@ void BundleActiveUserService::DeleteUninstalledBundleStats(const std::string& bu if (it != nullptr) { DeleteMemUsageStats(it, bundleName, uid, appIndex); DeleteMemEvent(it, bundleName, uid, appIndex); - DeleteMemRecords(it, bundleName, uid, appIndex); - DeleteMemPackageUidSet(it, bundleName, uid, appIndex); } } + DeleteMemRecords(bundleName, uid, appIndex); + DeleteMemPackageUidSet(bundleName, uid, appIndex); database_.OnPackageUninstalled(userId_, bundleName, uid, appIndex); } @@ -109,8 +109,8 @@ void BundleActiveUserService::DeleteMemEvent(const std::shared_ptr& currentStats, - const std::string& bundleName, const int32_t deletedUid, const int32_t appIndex) +void BundleActiveUserService::DeleteMemRecords(const std::string& bundleName, const int32_t deletedUid, + const int32_t appIndex) { if (appIndex != MAIN_APP_INDEX) { for (auto it = moduleRecords_.begin(); it != moduleRecords_.end();) { @@ -132,8 +132,8 @@ void BundleActiveUserService::DeleteMemRecords(const std::shared_ptr& currentStats, - const std::string& bundleName, const int32_t deletedUid, const int32_t appIndex) +void BundleActiveUserService::DeleteMemPackageUidSet(const std::string& bundleName, + const int32_t deletedUid, const int32_t appIndex) { if (appIndex != MAIN_APP_INDEX) { BundleActiveBundleMgrHelper::GetInstance()->DeletePackageUid(bundleName, deletedUid); -- Gitee