diff --git a/services/packageusage/include/bundle_active_user_service.h b/services/packageusage/include/bundle_active_user_service.h index aa825c641bf62a186555ea4057ec245fb075f775..45da2f96ea09dafb411f3972e998799db9336eb1 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 51cfcdf23bc8f45002aa80df3859d85fffb096d8..8df251d1ad86b8507a5cf123d0c70a18b7154b51 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);