mirror of
https://gitee.com/openharmony/bundlemanager_bundle_framework
synced 2024-11-27 01:11:15 +00:00
Description:fix codeCheck
Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: wangtiantian <wangtiantian19@huawei.com>
This commit is contained in:
parent
197c97236a
commit
464baef48b
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
enum AbilityInfoFlag {
|
||||
GET_ABILITY_INFO_DEFAULT = 0x00000000,
|
||||
GET_ABILITY_INFO_WITH_PERMISSION = 0x00000002,
|
||||
@ -215,7 +214,6 @@ struct AbilityInfo : public Parcelable {
|
||||
void Dump(std::string prefix, int fd);
|
||||
void ConvertToCompatiableAbilityInfo(CompatibleAbilityInfo& compatibleAbilityInfo) const;
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_ABILITY_INFO_H
|
@ -26,7 +26,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
enum ApplicationFlag {
|
||||
GET_BASIC_APPLICATION_INFO = 0x00000000,
|
||||
GET_APPLICATION_INFO_WITH_PERMS = 0x00000008,
|
||||
@ -126,7 +125,6 @@ struct ApplicationInfo : public Parcelable {
|
||||
void Dump(std::string prefix, int fd);
|
||||
void ConvertToCompatibleApplicationInfo(CompatibleApplicationInfo& compatibleApplicationInfo) const;
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_APPLICATION_INFO_H
|
@ -21,7 +21,6 @@
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
namespace Constants {
|
||||
|
||||
const std::string EMPTY_STRING = "";
|
||||
const std::string BUNDLE_PROFILE_NAME = "config.json";
|
||||
const std::string INSTALL_FILE_SUFFIX = ".hap";
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
enum class ModuleColorMode {
|
||||
AUTO = -1,
|
||||
DARK,
|
||||
@ -51,7 +50,6 @@ struct HapModuleInfo : public Parcelable {
|
||||
virtual bool Marshalling(Parcel &parcel) const override;
|
||||
static HapModuleInfo *Unmarshalling(Parcel &parcel);
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_HAP_MODULE_INFO_H
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <string>
|
||||
|
||||
#include "parcel.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
@ -52,7 +51,6 @@ struct InstallParam : public Parcelable {
|
||||
virtual bool Marshalling(Parcel &parcel) const override;
|
||||
static InstallParam *Unmarshalling(Parcel &parcel);
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_INSTALL_PARAM_H
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
/*
|
||||
* form_json and to_json is global static overload method, which need callback by json library,
|
||||
* and can not rename this function, so don't named according UpperCamelCase style
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
struct LauncherAbilityInfo {
|
||||
public:
|
||||
ApplicationInfo applicationInfo;
|
||||
@ -33,7 +32,6 @@ public:
|
||||
int32_t userId;
|
||||
int64_t installTime;
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_LAUNCHER_ABILITYINFO_H
|
@ -22,7 +22,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
#define READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(type, parcel, data) \
|
||||
do { \
|
||||
if (!(parcel).Read##type(data)) { \
|
||||
@ -38,8 +37,6 @@ namespace AppExecFwk {
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_PARCEL_MACRO_H
|
@ -37,7 +37,6 @@ struct PermissionDef : public Parcelable {
|
||||
virtual bool Marshalling(Parcel &parcel) const override;
|
||||
static PermissionDef *Unmarshalling(Parcel &parcel);
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_PERMISSION_DEF_H
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
struct ShortcutIntent {
|
||||
std::string targetBundle;
|
||||
std::string targetClass;
|
||||
@ -45,7 +44,6 @@ struct ShortcutInfo : public Parcelable {
|
||||
virtual bool Marshalling(Parcel &parcel) const override;
|
||||
static ShortcutInfo *Unmarshalling(Parcel &parcel);
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_SHORTCUT_INFO_H
|
@ -28,9 +28,7 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
namespace {
|
||||
|
||||
const std::string JSON_KEY_PACKAGE = "package";
|
||||
const std::string JSON_KEY_NAME = "name";
|
||||
const std::string JSON_KEY_BUNDLE_NAME = "bundleName";
|
||||
@ -80,7 +78,6 @@ const std::string JSON_KEY_FORM_ENABLED = "formEnabled";
|
||||
const std::string JSON_KEY_SRC_PATH = "srcPath";
|
||||
const std::string JSON_KEY_SRC_LANGUAGE = "srcLanguage";
|
||||
const std::string JSON_KEY_IS_HOME_ABILITY = "isHomeAbility";
|
||||
|
||||
} // namespace
|
||||
|
||||
bool AbilityInfo::ReadFromParcel(Parcel &parcel)
|
||||
@ -818,6 +815,5 @@ void AbilityInfo::ConvertToCompatiableAbilityInfo(CompatibleAbilityInfo& compati
|
||||
compatibleAbilityInfo.descriptionId = descriptionId;
|
||||
compatibleAbilityInfo.enabled = enabled;
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -551,6 +551,5 @@ void ApplicationInfo::ConvertToCompatibleApplicationInfo(CompatibleApplicationIn
|
||||
compatibleApplicationInfo.enabled = enabled;
|
||||
compatibleApplicationInfo.debug = debug;
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
@ -26,7 +26,6 @@
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
using namespace Constants;
|
||||
|
||||
bool CompatibleAbilityInfo::ReadFromParcel(Parcel& parcel)
|
||||
{
|
||||
APP_LOGD("CompatibleAbilityInfo::ReadFromParcel called");
|
||||
@ -268,7 +267,6 @@ void CompatibleAbilityInfo::ConvertToAbilityInfo(AbilityInfo& abilityInfo) const
|
||||
abilityInfo.descriptionId = descriptionId;
|
||||
abilityInfo.enabled = enabled;
|
||||
abilityInfo.originalBundleName = bundleName;
|
||||
|
||||
}
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -252,6 +252,5 @@ void from_json(const nlohmann::json &jsonObject, ShortcutInfo &shortcutInfo)
|
||||
parseResult,
|
||||
ArrayType::NOT_ARRAY);
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class IBundleInstaller : public IRemoteBroker {
|
||||
public:
|
||||
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.appexecfwk.BundleInstaller");
|
||||
@ -107,7 +106,6 @@ public:
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_BUNDLEMGR_BUNDLE_INSTALLER_INTERFACE_H
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class BundleInstallerProxy : public IRemoteProxy<IBundleInstaller> {
|
||||
public:
|
||||
explicit BundleInstallerProxy(const sptr<IRemoteObject> &object);
|
||||
@ -84,7 +83,6 @@ private:
|
||||
MessageOption& option);
|
||||
static inline BrokerDelegator<BundleInstallerProxy> delegator_;
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_BUNDLEMGR_BUNDLE_INSTALLER_PROXY_H
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class BundleParser {
|
||||
public:
|
||||
/**
|
||||
@ -34,7 +33,6 @@ public:
|
||||
*/
|
||||
ErrCode Parse(const std::string &pathName, InnerBundleInfo &innerBundleInfo) const;
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_PARSER_H
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class BundlePermissionMgr {
|
||||
public:
|
||||
/**
|
||||
@ -155,7 +154,6 @@ private:
|
||||
*/
|
||||
static int RemoveSystemGrantedReqPermissions(const std::string &bundleName);
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_PERMISSION_MGR_H
|
@ -24,7 +24,6 @@ namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class BundleMgrService;
|
||||
|
||||
class BundleScanner {
|
||||
public:
|
||||
BundleScanner();
|
||||
@ -47,7 +46,6 @@ private:
|
||||
private:
|
||||
std::list<std::string> entries_;
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_SCANNER_H
|
||||
|
@ -20,15 +20,12 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class BundleStatusCallbackDeathRecipient : public IRemoteObject::DeathRecipient {
|
||||
public:
|
||||
BundleStatusCallbackDeathRecipient();
|
||||
~BundleStatusCallbackDeathRecipient();
|
||||
virtual void OnRemoteDied(const wptr<IRemoteObject> &object) override;
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_BUNDLE_STATUS_CALLBACK_DEATH_RECIPIENT_H
|
||||
|
@ -20,12 +20,10 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class BundleVerifyMgr {
|
||||
public:
|
||||
static bool HapVerify(const std::string &filePath, Security::Verify::HapVerifyResult &hapVerifyResult);
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_VERIFY_MGR_H
|
@ -23,7 +23,6 @@
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
namespace ProfileReader {
|
||||
|
||||
// common tag
|
||||
const std::string PROFILE_KEY_NAME = "name";
|
||||
const std::string PROFILE_KEY_ORIGINAL_NAME = "originalName";
|
||||
@ -227,7 +226,6 @@ const uint32_t VALUE_HOME_SCREEN = 1 << 0;
|
||||
const uint32_t VALUE_SEARCHBOX = 1 << 1;
|
||||
const int32_t MAX_USAGE_RECORD_SIZE = 1000;
|
||||
|
||||
|
||||
const std::string KEY_HOME_SCREEN = "homeScreen";
|
||||
const std::string KEY_SEARCHBOX = "searchbox";
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class InstalldHostImpl : public InstalldHost {
|
||||
public:
|
||||
InstalldHostImpl();
|
||||
@ -77,7 +76,6 @@ public:
|
||||
*/
|
||||
virtual ErrCode CleanBundleDataDir(const std::string &bundleDir) override;
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_INSTALLD_HOST_IMPL_H
|
@ -25,7 +25,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class InstalldOperator {
|
||||
public:
|
||||
/**
|
||||
@ -117,7 +116,6 @@ public:
|
||||
*/
|
||||
static bool MkOwnerDir(const std::string &path, bool isReadByOthers, const int uid, const int gid);
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_INSTALLD_OPERATOR_H
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
class InstalldService {
|
||||
public:
|
||||
InstalldService();
|
||||
@ -66,7 +65,6 @@ private:
|
||||
|
||||
DISALLOW_COPY_AND_MOVE(InstalldService);
|
||||
};
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_INSTALLD_SERVICE_H
|
@ -33,7 +33,6 @@
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
namespace {} // namespace
|
||||
|
||||
bool InstalldOperator::IsExistFile(const std::string &path)
|
||||
{
|
||||
if (path.empty()) {
|
||||
@ -239,6 +238,5 @@ bool InstalldOperator::MkOwnerDir(const std::string &path, bool isReadByOthers,
|
||||
}
|
||||
return ChangeFileAttr(path, uid, gid);
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -30,7 +30,6 @@ using namespace std::chrono_literals;
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
InstalldService::InstalldService()
|
||||
{
|
||||
APP_LOGI("installd service instance is created");
|
||||
@ -122,6 +121,5 @@ void InstalldService::Stop()
|
||||
isReady_ = false;
|
||||
APP_LOGI("installd service stop successfully");
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
ErrCode InstalldClient::CreateBundleDir(const std::string &bundleDir)
|
||||
{
|
||||
if (bundleDir.empty()) {
|
||||
@ -122,6 +121,5 @@ bool InstalldClient::GetInstalldProxy()
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
InstalldHost::InstalldHost()
|
||||
{
|
||||
init();
|
||||
|
@ -334,8 +334,8 @@ Status ModuleUsageRecordStorage::GetKvStore()
|
||||
{
|
||||
Options options = {
|
||||
.createIfMissing = true,
|
||||
.encrypt = false,
|
||||
.autoSync = true,
|
||||
.encrypt = false,
|
||||
.autoSync = true,
|
||||
.kvStoreType = KvStoreType::SINGLE_VERSION
|
||||
};
|
||||
|
||||
|
@ -22,13 +22,11 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
void PermissionChangedDeathRecipient::OnRemoteDied(const wptr<IRemoteObject>& object)
|
||||
{
|
||||
APP_LOGI("permission changed callback died, remove the callback");
|
||||
sptr<OnPermissionChangedCallback> callback = iface_cast<OnPermissionChangedCallback>(object.promote());
|
||||
DelayedSingleton<BundleMgrService>::GetInstance()->GetDataMgr()->UnregisterPermissionsChanged(callback);
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
@ -23,7 +23,6 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
|
||||
sptr<IRemoteObject> SystemAbilityHelper::GetSystemAbility(const int32_t systemAbilityId)
|
||||
{
|
||||
sptr<ISystemAbilityManager> systemAbilityMgr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
|
||||
@ -53,6 +52,5 @@ bool SystemAbilityHelper::RemoveSystemAbility(const int32_t systemAbilityId)
|
||||
APP_LOGE("fail to remove %{public}d from system ability manager", systemAbilityId);
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
Loading…
Reference in New Issue
Block a user