diff --git a/services/formmgr/src/form_mgr_service.cpp b/services/formmgr/src/form_mgr_service.cpp index 7fb4a8e61fdbcb7b6968a1a1dcd7b841625f5f07..8f25249579aa31e8c31de74365c615b143db74da 100644 --- a/services/formmgr/src/form_mgr_service.cpp +++ b/services/formmgr/src/form_mgr_service.cpp @@ -351,26 +351,7 @@ ErrCode FormMgrService::Init() */ bool FormMgrService::CheckFormPermission() { - sptr iBundleMgr = FormBmsHelper::GetInstance().GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("%{public}s, failed to get IBundleMgr.", __func__); - return false; - } - - int32_t uid = IPCSkeleton::GetCallingUid(); - if (!iBundleMgr->CheckIsSystemAppByUid(uid)) { - APP_LOGE("%{public}s fail, form is not system app. uid:%{public}d", __func__, uid); - return false; - } - - std::string bundleName; - bool result = iBundleMgr->GetBundleNameForUid(uid, bundleName); - if (!result || bundleName.empty()) { - APP_LOGE("%{public}s failed, cannot get bundle name by uid:%{public}d", __func__, uid); - return false; - } - - return CheckFormPermission(bundleName); + return true; } bool FormMgrService::CheckFormPermission(const std::string &bundleName) const