diff --git a/BUILD.gn b/BUILD.gn index c7e30147ba091d70e12ccdd6aa26eaee1483112e..576fc0cac6cdf59630e8a0e0661883f331e3d0a2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -79,6 +79,7 @@ ohos_shared_library("usagestatsinner") { "interfaces/innerkits/src/bundle_active_high_frequency_period.cpp", ] public_configs = [ ":usagestats_public_config" ] + cflags_cc = [ "-fstack-protector-strong" ] deps = [ ":app_group_callback_interface", ":bundle_active_interface", diff --git a/services/common/src/bundle_active_core.cpp b/services/common/src/bundle_active_core.cpp index 0c918ec92c89015d81f0840c5cbec5bdbd35af3d..2c511735cac3f835ea9e041824828149b04bc3e5 100644 --- a/services/common/src/bundle_active_core.cpp +++ b/services/common/src/bundle_active_core.cpp @@ -168,7 +168,7 @@ void BundleActiveCommonEventSubscriber::HandlePackageRemoveEvent(const CommonEve action.c_str(), userId, bundleName.c_str()); BundleActiveReportHandlerObject tmpHandlerObject(userId, bundleName); tmpHandlerObject.uid_ = data.GetWant().GetIntParam("uid", -1); - tmpHandlerObject.appIndex_ = data.GetWant().GetIntParam("appIndex", -1); + tmpHandlerObject.appIndex_ = data.GetWant().GetIntParam("appIndex", 0); std::shared_ptr handlerobjToPtr = std::make_shared(tmpHandlerObject); auto bundleActiveReportHandler = BundleActiveReportController::GetInstance().GetBundleReportHandler();