diff --git a/BUILD.gn b/BUILD.gn index ff06df6b1d18ae716b80a53bfcac73b188aca0bf..7ff3305f8e32d2144f8a1092dcef3ccfe287ab16 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -15,7 +15,7 @@ import("//build/ohos/sa_profile/sa_profile.gni") import("device_usage_statistics.gni") ohos_sa_profile("bundleactive_sa_profile") { - sources = [ "sa_profile/1906.xml" ] + sources = [ "sa_profile/1907.xml" ] part_name = "device_usage_statistics" } diff --git a/interfaces/innerkits/src/bundle_active_client.cpp b/interfaces/innerkits/src/bundle_active_client.cpp index eb90b0f0553d3af8c224354e95a30f6c23c23200..fb255ff48f007ff8888d36da794b930e09053264 100644 --- a/interfaces/innerkits/src/bundle_active_client.cpp +++ b/interfaces/innerkits/src/bundle_active_client.cpp @@ -31,9 +31,9 @@ bool BundleActiveClient::GetBundleActiveProxy() return false; } - sptr object = samgr->GetSystemAbility(BUNDLE_ACTIVE_SYS_ABILITY_ID); + sptr object = samgr->GetSystemAbility(DEVICE_USAGE_STATISTICS_SYS_ABILITY_ID); if (object == nullptr) { - BUNDLE_ACTIVE_LOGE("Failed to get SystemAbility[1906] ."); + BUNDLE_ACTIVE_LOGE("Failed to get SystemAbility[1907] ."); return false; } diff --git a/sa_profile/1906.xml b/sa_profile/1907.xml similarity index 97% rename from sa_profile/1906.xml rename to sa_profile/1907.xml index 60c148a83f87349ce752828093a9eee10095c864..39fd3432a7f7c7d6af7c3540a5faa17ba13ec70a 100644 --- a/sa_profile/1906.xml +++ b/sa_profile/1907.xml @@ -16,7 +16,7 @@ bundleactive_service - 1906 + 1907 libbundleactiveservice.z.so true false diff --git a/services/src/bundle_active_service.cpp b/services/src/bundle_active_service.cpp index 5673d570d974ba11cb6c6aae990a6157f908bb1a..6b5fd08a7e4e7fe2c4243265aeabc0aac79bd821 100644 --- a/services/src/bundle_active_service.cpp +++ b/services/src/bundle_active_service.cpp @@ -17,16 +17,16 @@ namespace OHOS { namespace BundleActive { -REGISTER_SYSTEM_ABILITY_BY_ID(BundleActiveService, BUNDLE_ACTIVE_SYS_ABILITY_ID, true); +REGISTER_SYSTEM_ABILITY_BY_ID(BundleActiveService, DEVICE_USAGE_STATISTICS_SYS_ABILITY_ID, true); void BundleActiveService::OnStart() { int ret = Publish(this); if (!ret) { - BUNDLE_ACTIVE_LOGE("[Server] OnStart, Register SystemAbility[1906] FAIL."); + BUNDLE_ACTIVE_LOGE("[Server] OnStart, Register SystemAbility[1907] FAIL."); return; } - BUNDLE_ACTIVE_LOGI("[Server] OnStart, Register SystemAbility[1906] SUCCESS."); + BUNDLE_ACTIVE_LOGI("[Server] OnStart, Register SystemAbility[1907] SUCCESS."); } void BundleActiveService::OnStop()