diff --git a/interfaces/kits/js/app_control/js_app_control.cpp b/interfaces/kits/js/app_control/js_app_control.cpp index 7739bcdf8d35930d922c02773312fbd9f7c8cba1..13914110c6eda535bd1adada85994057dab192c8 100644 --- a/interfaces/kits/js/app_control/js_app_control.cpp +++ b/interfaces/kits/js/app_control/js_app_control.cpp @@ -504,7 +504,7 @@ void ConvertRuleInfo(napi_env env, napi_value nRule, const DisposedRule &rule) NAPI_CALL_RETURN_VOID(env, napi_set_named_property(env, nRule, "priority", nPriority)); } -bool ParseDiposedRule(napi_env env, napi_value nRule, DisposedRule &rule) +bool ParseDisposedRule(napi_env env, napi_value nRule, DisposedRule &rule) { napi_valuetype valueType; NAPI_CALL_BASE(env, napi_typeof(env, nRule, &valueType), false); @@ -626,7 +626,7 @@ bool ParseDisposedRuleConfiguration(napi_env env, napi_value nDisposedRuleConfig napi_get_named_property(env, nDisposedRuleConfiguration, "disposedRule", &prop); DisposedRule disposedRule; - if (!ParseDiposedRule(env, prop, disposedRule)) { + if (!ParseDisposedRule(env, prop, disposedRule)) { APP_LOGE("disposedRule invalid!"); BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, DISPOSED_RULE, DISPOSED_RULE_TYPE); return false; @@ -791,7 +791,7 @@ napi_value SetDisposedRule(napi_env env, napi_callback_info info) return nullptr; } DisposedRule rule; - if (!ParseDiposedRule(env, args[ARGS_POS_ONE], rule)) { + if (!ParseDisposedRule(env, args[ARGS_POS_ONE], rule)) { APP_LOGE("rule invalid!"); BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, DISPOSED_RULE, DISPOSED_RULE_TYPE); return nRet; @@ -867,7 +867,7 @@ void ConvertRuleInfo(napi_env env, napi_value nRule, const UninstallDisposedRule } -bool ParseUninstallDiposedRule(napi_env env, napi_value nRule, UninstallDisposedRule &rule) +bool ParseUninstallDisposedRule(napi_env env, napi_value nRule, UninstallDisposedRule &rule) { napi_valuetype valueType; NAPI_CALL_BASE(env, napi_typeof(env, nRule, &valueType), false); @@ -1017,7 +1017,7 @@ napi_value SetUninstallDisposedRule(napi_env env, napi_callback_info info) return nullptr; } UninstallDisposedRule rule; - if (!ParseUninstallDiposedRule(env, args[ARGS_POS_ONE], rule)) { + if (!ParseUninstallDisposedRule(env, args[ARGS_POS_ONE], rule)) { APP_LOGE("rule invalid!"); BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, UNINSTALL_DISPOSED_RULE, UNINSTALL_DISPOSED_RULE_TYPE); diff --git a/services/bundlemgr/include/bundle_common_event_mgr.h b/services/bundlemgr/include/bundle_common_event_mgr.h index 70f20680e08fc33c8f4ceb037be3853a91ba64e5..c58adca7a08031220da8ad81ca283332dd33e0dd 100755 --- a/services/bundlemgr/include/bundle_common_event_mgr.h +++ b/services/bundlemgr/include/bundle_common_event_mgr.h @@ -86,8 +86,8 @@ public: const SandboxInstallType &type); void NotifyOverlayModuleStateStatus(const std::string &bundleName, const std::string &moduleName, bool isEnabled, int32_t userId, int32_t uid); - void NotifySetDiposedRule(const std::string &appId, int32_t userId, const std::string &data, int32_t appIndex); - void NotifyDeleteDiposedRule(const std::string &appId, int32_t userId, int32_t appIndex); + void NotifySetDisposedRule(const std::string &appId, int32_t userId, const std::string &data, int32_t appIndex); + void NotifyDeleteDisposedRule(const std::string &appId, int32_t userId, int32_t appIndex); void NotifyDynamicIconEvent( const std::string &bundleName, bool isEnableDynamicIcon, int32_t userId, int32_t appIndex); void NotifyBundleResourcesChanged(const int32_t userId, const uint32_t type); diff --git a/services/bundlemgr/src/app_control/app_control_manager.cpp b/services/bundlemgr/src/app_control/app_control_manager.cpp index 44ba8246cf7c70b37a2765c361856db70bdf30ae..0dac9e6360dd92997d223e599c3b84d2b5a5e12a 100644 --- a/services/bundlemgr/src/app_control/app_control_manager.cpp +++ b/services/bundlemgr/src/app_control/app_control_manager.cpp @@ -335,7 +335,7 @@ ErrCode AppControlManager::SetDisposedStatus(const std::string &appId, const Wan appRunningControlRuleResult_.erase(iter); } - commonEventMgr_->NotifySetDiposedRule(appId, userId, want.ToString(), Constants::MAIN_APP_INDEX); + commonEventMgr_->NotifySetDisposedRule(appId, userId, want.ToString(), Constants::MAIN_APP_INDEX); return ERR_OK; } @@ -352,7 +352,7 @@ ErrCode AppControlManager::DeleteDisposedStatus(const std::string &appId, int32_ if (iter != appRunningControlRuleResult_.end()) { appRunningControlRuleResult_.erase(iter); } - commonEventMgr_->NotifyDeleteDiposedRule(appId, userId, Constants::MAIN_APP_INDEX); + commonEventMgr_->NotifyDeleteDisposedRule(appId, userId, Constants::MAIN_APP_INDEX); return ERR_OK; } @@ -554,7 +554,7 @@ ErrCode AppControlManager::SetDisposedRule(const std::string &callerName, const DeleteAbilityRunningRuleCache({ appIdKey, transformedAppIdKey }); LOG_D(BMS_TAG_DEFAULT, "%{public}s set rule, user:%{public}d index:%{public}d", callerName.c_str(), userId, appIndex); - commonEventMgr_->NotifySetDiposedRule(appId, userId, rule.ToString(), appIndex); + commonEventMgr_->NotifySetDisposedRule(appId, userId, rule.ToString(), appIndex); return ERR_OK; } @@ -587,7 +587,7 @@ ErrCode AppControlManager::DeleteDisposedRule( std::string appIdKey = GenerateAppRunningRuleCacheKey(appId, userId, appIndex); std::string transformedAppIdKey = GenerateAppRunningRuleCacheKey(transformedAppId, userId, appIndex); DeleteAbilityRunningRuleCache({ appIdKey, transformedAppIdKey}); - commonEventMgr_->NotifyDeleteDiposedRule(appId, userId, appIndex); + commonEventMgr_->NotifyDeleteDisposedRule(appId, userId, appIndex); return ERR_OK; } @@ -610,7 +610,7 @@ ErrCode AppControlManager::DeleteAllDisposedRuleByBundle(const InnerBundleInfo & key = key + std::string("_"); std::string cacheKey = key + std::to_string(appIndex); DeleteAbilityRunningRuleCache({ cacheKey }); - commonEventMgr_->NotifyDeleteDiposedRule(appId, userId, appIndex); + commonEventMgr_->NotifyDeleteDisposedRule(appId, userId, appIndex); if (appIndex != Constants::MAIN_APP_INDEX) { return ERR_OK; } @@ -625,7 +625,7 @@ ErrCode AppControlManager::DeleteAllDisposedRuleByBundle(const InnerBundleInfo & for (const int32_t index : appIndexVec) { std::string ruleCacheKey = key + std::to_string(index); DeleteAbilityRunningRuleCache({ ruleCacheKey }); - commonEventMgr_->NotifyDeleteDiposedRule(appId, userId, index); + commonEventMgr_->NotifyDeleteDisposedRule(appId, userId, index); } return ERR_OK; } diff --git a/services/bundlemgr/src/bundle_common_event_mgr.cpp b/services/bundlemgr/src/bundle_common_event_mgr.cpp index 602fb6d4f3855d0b80cec6f90d8993b63e6bf84b..338921e46058310262736b743fb93eec75778a04 100755 --- a/services/bundlemgr/src/bundle_common_event_mgr.cpp +++ b/services/bundlemgr/src/bundle_common_event_mgr.cpp @@ -329,7 +329,7 @@ std::string BundleCommonEventMgr::GetCommonEventData(const NotifyType &type) return iter->second; } -void BundleCommonEventMgr::NotifySetDiposedRule( +void BundleCommonEventMgr::NotifySetDisposedRule( const std::string &appId, int32_t userId, const std::string &data, int32_t appIndex) { OHOS::AAFwk::Want want; @@ -349,7 +349,7 @@ void BundleCommonEventMgr::NotifySetDiposedRule( IPCSkeleton::SetCallingIdentity(identity); } -void BundleCommonEventMgr::NotifyDeleteDiposedRule(const std::string &appId, int32_t userId, int32_t appIndex) +void BundleCommonEventMgr::NotifyDeleteDisposedRule(const std::string &appId, int32_t userId, int32_t appIndex) { OHOS::AAFwk::Want want; want.SetAction(DISPOSED_RULE_DELETED);