diff --git a/services/bundlemgr/src/app_control/app_control_manager_rdb.cpp b/services/bundlemgr/src/app_control/app_control_manager_rdb.cpp index e9a5f12adbef688bf7e5306c68c301fcce2576cd..558a875fe4ad7478a2629b919315f3bb51d866dc 100644 --- a/services/bundlemgr/src/app_control/app_control_manager_rdb.cpp +++ b/services/bundlemgr/src/app_control/app_control_manager_rdb.cpp @@ -30,7 +30,6 @@ namespace { constexpr const char* DISPOSED_RULE = "DisposedRule"; constexpr const char* UNINSTALL_DISPOSED_RULE = "UninstallDisposedRule"; constexpr const char* APP_CONTROL_EDM_DEFAULT_MESSAGE = "The app has been disabled by EDM"; - constexpr const char* DEFAULT = "default"; constexpr int8_t CALLING_NAME_INDEX = 1; constexpr int8_t APP_ID_INDEX = 4; constexpr int8_t CONTROL_MESSAGE_INDEX = 5; diff --git a/services/bundlemgr/src/app_service_fwk/app_service_fwk_installer.cpp b/services/bundlemgr/src/app_service_fwk/app_service_fwk_installer.cpp index a75fa6687ebb4e622014f1a2d126ffa33fc63d90..aa2a32a6adb7dd94e8dbac71acd7bde842605111 100644 --- a/services/bundlemgr/src/app_service_fwk/app_service_fwk_installer.cpp +++ b/services/bundlemgr/src/app_service_fwk/app_service_fwk_installer.cpp @@ -27,7 +27,6 @@ namespace OHOS { namespace AppExecFwk { namespace { constexpr const char* HSP_VERSION_PREFIX = "v"; -constexpr const char* HSP_PATH = ", path: "; constexpr const char* SHARED_MODULE_TYPE = "shared"; constexpr const char* COMPILE_SDK_TYPE_OPEN_HARMONY = "OpenHarmony"; constexpr const char* DEBUG_APP_IDENTIFIER = "DEBUG_LIB_ID"; diff --git a/services/bundlemgr/src/base_bundle_installer.cpp b/services/bundlemgr/src/base_bundle_installer.cpp index f9efc5f6aad36c6663f0c9a1be56e8d97c1bc3ba..952f17ac1e269f557daa8eb8bc976979b41758c0 100644 --- a/services/bundlemgr/src/base_bundle_installer.cpp +++ b/services/bundlemgr/src/base_bundle_installer.cpp @@ -107,7 +107,6 @@ constexpr int32_t STORAGE_MANAGER_MANAGER_ID = 5003; constexpr int16_t ATOMIC_SERVICE_DATASIZE_THRESHOLD_MB_PRESET = 200; constexpr int8_t SINGLE_HSP_VERSION = 1; constexpr int8_t USER_MODE = 0; -constexpr int8_t ROOT_MODE = 1; constexpr const char* BMS_KEY_SHELL_UID = "const.product.shell.uid"; constexpr const char* IS_ROOT_MODE_PARAM = "const.debuggable"; constexpr const char* BMS_ACTIVATION_LOCK = "persist.bms.activation-lock"; @@ -115,7 +114,6 @@ constexpr const char* APPSPAWN_PRELOAD_ARKWEB_ENGINE = "const.startup.appspawn.p constexpr const char* BMS_TRUE = "true"; constexpr const char* BMS_FALSE = "false"; constexpr int8_t BMS_ACTIVATION_LOCK_VAL_LEN = 20; -constexpr const char* DATA_EXTENSION_PATH = "/extension/"; const char* INSTALL_SOURCE_UNKNOWN = "unknown"; const char* ARK_WEB_BUNDLE_NAME_PARAM = "persist.arkwebcore.package_name"; const char* OLD_ARK_WEB_BUNDLE_NAME = "com.ohos.nweb"; @@ -6857,8 +6855,7 @@ ErrCode BaseBundleInstaller::CreateArkStartupCache(const ArkStartupCache &create LOG_NOFUNC_W(BMS_TAG_INSTALLER, "%{public}s is not in startupBundles", createArk.bundleName.c_str()); return ERR_APPEXECFWK_ARK_STARTUP_CACHE_ONLY_ALLOW_CREATE_IN_WHITE_LIST; } - - bool isDirExist = false; + ErrCode result = InstalldClient::GetInstance()->Mkdir(createArk.cacheDir, createArk.mode, createArk.uid, createArk.gid); if (result != ERR_OK) { diff --git a/services/bundlemgr/src/bundle_common_event_mgr.cpp b/services/bundlemgr/src/bundle_common_event_mgr.cpp index 3ae5656599d2de954c1f79708d8f99767c450d20..e869064378f590767e449e59582df25119c45c48 100755 --- a/services/bundlemgr/src/bundle_common_event_mgr.cpp +++ b/services/bundlemgr/src/bundle_common_event_mgr.cpp @@ -50,7 +50,6 @@ constexpr const char* ASSET_ACCESS_GROUPS = "assetAccessGroups"; constexpr const char* DEVELOPERID = "developerId"; constexpr const char* CHANGE_DEFAULT_APPLICATION = "ohos.permission.CHANGE_DEFAULT_APPLICATION"; constexpr const char* UTD_IDS = "utdIds"; -constexpr const char* BUNDLE_NAME = "bundleName"; constexpr const char* USER_ID = "userId"; constexpr const char* SHORTCUT_CHANGED = "usual.event.SHORTCUT_CHANGED"; constexpr const char* SHORTCUT_ID = "shortcutId"; diff --git a/services/bundlemgr/src/bundle_data_mgr.cpp b/services/bundlemgr/src/bundle_data_mgr.cpp index 4b7ab5f182893b68619852738f054f6254edc51c..db91eff901b091e95db102a8dbdf9d3b212b08fd 100644 --- a/services/bundlemgr/src/bundle_data_mgr.cpp +++ b/services/bundlemgr/src/bundle_data_mgr.cpp @@ -80,7 +80,6 @@ namespace AppExecFwk { namespace { constexpr int MAX_EVENT_CALL_BACK_SIZE = 100; constexpr int8_t DATA_GROUP_INDEX_START = 1; -constexpr int8_t UUID_LENGTH = 36; constexpr int8_t PROFILE_PREFIX_LENGTH = 9; constexpr uint16_t UUID_LENGTH_MAX = 512; constexpr const char* GLOBAL_RESOURCE_BUNDLE_NAME = "ohos.global.systemres"; @@ -109,7 +108,6 @@ constexpr const char* JSON_SUFFIX = ".json"; constexpr const char* SCHEME_HTTPS = "https"; constexpr const char* META_DATA_SHORTCUTS_NAME = "ohos.ability.shortcuts"; constexpr const char* BMS_EVENT_ADDITIONAL_INFO_CHANGED = "bms.event.ADDITIONAL_INFO_CHANGED"; -constexpr const char* ENTRY = "entry"; constexpr const char* CLONE_BUNDLE_PREFIX = "clone_"; constexpr const char* RESOURCE_STRING_PREFIX = "$string:"; @@ -4078,7 +4076,6 @@ bool BundleDataMgr::GetBundleStats(const std::string &bundleName, ErrCode BundleDataMgr::BatchGetBundleStats(const std::vector &bundleNames, int32_t userId, std::vector &bundleStats) const { - int32_t uid = -1; std::unordered_map uidMap; std::vector bundleNameList = bundleNames; std::vector bundleStatsList; diff --git a/services/bundlemgr/src/bundle_install_checker.cpp b/services/bundlemgr/src/bundle_install_checker.cpp index 6c25a8dca913bbf000c108d74c30d7f46522b2ec..16d00b90bb98b223a898c3ccaeea2b414bbb7f45 100644 --- a/services/bundlemgr/src/bundle_install_checker.cpp +++ b/services/bundlemgr/src/bundle_install_checker.cpp @@ -50,14 +50,12 @@ constexpr const char* ALLOW_APP_USE_PRIVILEGE_EXTENSION = "allowAppUsePrivilegeE constexpr const char* ALLOW_FORM_VISIBLE_NOTIFY = "allowFormVisibleNotify"; constexpr const char* ALLOW_APP_SHARE_LIBRARY = "allowAppShareLibrary"; constexpr const char* ALLOW_ENABLE_NOTIFICATION = "allowEnableNotification"; -constexpr const char* ALLOW_ARK_TS_LARGE_HEAP = "allowArkTsLargeHeap"; constexpr const char* APL_NORMAL = "normal"; constexpr const char* SLASH = "/"; constexpr const char* DOUBLE_SLASH = "//"; constexpr const char* SUPPORT_ISOLATION_MODE = "persist.bms.supportIsolationMode"; constexpr const char* VALUE_TRUE = "true"; constexpr const char* VALUE_TRUE_BOOL = "1"; -constexpr const char* VALUE_FALSE = "false"; constexpr const char* NONISOLATION_ONLY = "nonisolationOnly"; constexpr const char* ISOLATION_ONLY = "isolationOnly"; constexpr const char* SUPPORT_APP_TYPES = "const.bms.supportAppTypes"; @@ -65,7 +63,6 @@ constexpr const char* PROVIDED_DEVICE_FEATURES = "const.product.providedDeviceFe constexpr const char* SUPPORT_APP_TYPES_SEPARATOR = ","; constexpr int8_t SLAH_OFFSET = 2; constexpr int8_t THRESHOLD_VAL_LEN = 40; -constexpr const char* SYSTEM_APP_SCAN_PATH = "/system/app"; constexpr const char* DEVICE_TYPE_OF_DEFAULT = "default"; constexpr const char* DEVICE_TYPE_OF_PHONE = "phone"; constexpr const char* APP_INSTALL_PATH = "/data/app/el1/bundle"; diff --git a/services/bundlemgr/src/bundle_installer_host.cpp b/services/bundlemgr/src/bundle_installer_host.cpp index aab762c2bff846ba284fbd23a9f576dace1f7efb..ea2ad68f01299dd00ed14e27cca6116047fd69fd 100644 --- a/services/bundlemgr/src/bundle_installer_host.cpp +++ b/services/bundlemgr/src/bundle_installer_host.cpp @@ -37,7 +37,6 @@ namespace OHOS { namespace AppExecFwk { namespace { constexpr const char* GET_MANAGER_FAIL = "fail to get bundle installer manager"; -constexpr const char* MODULE_UPDATE_DIR = "/module_update/"; constexpr const char* BMS_PARA_BUNDLE_NAME = "ohos.bms.param.bundleName"; constexpr const char* BMS_PARA_IS_KEEP_DATA = "ohos.bms.param.isKeepData"; constexpr const char* BMS_PARA_USER_ID = "ohos.bms.param.userId"; diff --git a/services/bundlemgr/src/bundle_mgr_service_event_handler.cpp b/services/bundlemgr/src/bundle_mgr_service_event_handler.cpp index b150d37af05d5fe55aa7eb55a595917bb648a316..7d5a1d9a101cd886c33f9e7f46a1455a3ddeedb2 100644 --- a/services/bundlemgr/src/bundle_mgr_service_event_handler.cpp +++ b/services/bundlemgr/src/bundle_mgr_service_event_handler.cpp @@ -97,7 +97,6 @@ const std::vector FINGERPRINTS = { "const.product.incremental.version", "const.comp.hl.product_base_version.real" }; -constexpr const char* HSP_VERSION_PREFIX = "v"; constexpr const char* OTA_FLAG = "otaFlag"; // pre bundle profile constexpr const char* DEFAULT_PRE_BUNDLE_ROOT_DIR = "/system"; @@ -115,7 +114,6 @@ constexpr const char* SHARED_BUNDLE_PATH = "/shared_bundles"; constexpr const char* VERSION_SPECIAL_CUSTOM_APP_DIR = "/version/special_cust/app/"; constexpr const char* RESTOR_BUNDLE_NAME_LIST = "list"; constexpr const char* QUICK_FIX_APP_RECOVER_FILE = "/data/update/quickfix/app/temp/quickfix_app_recover.json"; -constexpr const char* INNER_UNDER_LINE = "_"; constexpr char SEPARATOR = '/'; constexpr const char* SYSTEM_RESOURCES_APP = "ohos.global.systemres"; constexpr const char* FOUNDATION_PROCESS_NAME = "foundation"; @@ -1639,7 +1637,6 @@ void BMSEventHandler::CheckAllBundleEl1ShaderCacheLocal() for (auto &infoPair : infos) { auto &info = infoPair.second; std::string bundleName = info.GetBundleName(); - BundleType type = info.GetApplicationBundleType(); std::vector allAppIndexes = {0}; std::vector cloneAppIndexes = dataMgr->GetCloneAppIndexesByInnerBundleInfo(info, userId); allAppIndexes.insert(allAppIndexes.end(), cloneAppIndexes.begin(), cloneAppIndexes.end()); @@ -1693,7 +1690,6 @@ void BMSEventHandler::CleanAllBundleEl1ShaderCacheLocal() for (auto &infoPair : infos) { auto &info = infoPair.second; std::string bundleName = info.GetBundleName(); - BundleType type = info.GetApplicationBundleType(); std::vector allAppIndexes = {0}; std::vector cloneAppIndexes = dataMgr->GetCloneAppIndexesByInnerBundleInfo(info, userId); allAppIndexes.insert(allAppIndexes.end(), cloneAppIndexes.begin(), cloneAppIndexes.end()); diff --git a/services/bundlemgr/src/bundle_resource/bundle_resource_event_subscriber.cpp b/services/bundlemgr/src/bundle_resource/bundle_resource_event_subscriber.cpp index fc9da47d0c3b62a96f5f2718fd7f66f9d9bf15a0..34b3f4177dedd659b42b708a1948aa4354e1c9d8 100644 --- a/services/bundlemgr/src/bundle_resource/bundle_resource_event_subscriber.cpp +++ b/services/bundlemgr/src/bundle_resource/bundle_resource_event_subscriber.cpp @@ -41,7 +41,6 @@ BundleResourceEventSubscriber::~BundleResourceEventSubscriber() void BundleResourceEventSubscriber::OnReceiveEvent(const EventFwk::CommonEventData &data) { std::string action = data.GetWant().GetAction(); - BundleResourceCallback callback; if (action == EventFwk::CommonEventSupport::COMMON_EVENT_USER_SWITCHED) { int32_t oldUserId = Constants::UNSPECIFIED_USERID; std::string oldId = data.GetWant().GetStringParam(OLD_USER_ID); diff --git a/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp b/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp index 2bd8f6a1ed020236680213bd45feb5aa2e594ff7..81df1e940f1a2c9ad5b665c745251054cb2afc2f 100644 --- a/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp +++ b/services/bundlemgr/src/bundle_resource/bundle_resource_manager.cpp @@ -38,7 +38,6 @@ constexpr const char* THREAD_POOL_NAME = "BundleResourceThreadPool"; constexpr int8_t CHECK_INTERVAL = 30; // 30ms constexpr const char* FOUNDATION_PROCESS_NAME = "foundation"; constexpr int8_t SCENE_ID_UPDATE_RESOURCE = 1 << 1; -constexpr const char* INNER_UNDER_LINE = "_"; constexpr const char* TASK_NAME = "ReleaseResourceTask"; constexpr uint64_t DELAY_TIME_MILLI_SECONDS = 3 * 60 * 1000; // 3mins constexpr const char* CONTACTS_BUNDLE_NAME = "com.ohos.contacts"; diff --git a/services/bundlemgr/src/bundle_resource/bundle_resource_param.cpp b/services/bundlemgr/src/bundle_resource/bundle_resource_param.cpp index 3f453ccef0404ffa067f6544f97d47916942e61b..62411e35dbea30cf130dd6088b63799b889ccd33 100644 --- a/services/bundlemgr/src/bundle_resource/bundle_resource_param.cpp +++ b/services/bundlemgr/src/bundle_resource/bundle_resource_param.cpp @@ -23,7 +23,6 @@ namespace OHOS { namespace AppExecFwk { namespace { constexpr int16_t MAX_LEN = 128; -constexpr const char* SYSTEM_LANGUAGE = "persist.global.locale"; constexpr const char* DEFAULT_LANGUAGE = "zh-Hans"; constexpr const char* DEFAULT_COLOR_MODE_LIGHT = "light"; } diff --git a/services/bundlemgr/src/default_app/default_app_mgr.cpp b/services/bundlemgr/src/default_app/default_app_mgr.cpp index af6fd5452d44bd7829d87b5400c3ec9a8c95e561..7e28ac4f212ec14ce12f80e7ab97d9be6161052e 100644 --- a/services/bundlemgr/src/default_app/default_app_mgr.cpp +++ b/services/bundlemgr/src/default_app/default_app_mgr.cpp @@ -49,8 +49,6 @@ constexpr const char* HTTPS_SCHEME = "https://"; constexpr const char* FILE_SCHEME = "file://"; constexpr const char* CONTENT_SCHEME = "content://"; constexpr const char* WILDCARD = "*"; -constexpr const char* PARAM_SEPARATOR = "?"; -constexpr const char* PARAM_ANONYMIZE = "?***"; constexpr const char* BROWSER = "BROWSER"; constexpr const char* IMAGE = "IMAGE"; constexpr const char* AUDIO = "AUDIO"; diff --git a/services/bundlemgr/src/inner_event_report.cpp b/services/bundlemgr/src/inner_event_report.cpp index 024a689439a41b6d5a85170f431c64ee0a069f0f..26f77d06c88d54445b26a904203a3c393aaafaac 100644 --- a/services/bundlemgr/src/inner_event_report.cpp +++ b/services/bundlemgr/src/inner_event_report.cpp @@ -41,7 +41,6 @@ constexpr const char* BUNDLE_QUICK_FIX = "BUNDLE_QUICK_FIX"; constexpr const char* CPU_SCENE_ENTRY = "CPU_SCENE_ENTRY"; constexpr const char* FREE_INSTALL_EVENT = "FREE_INSTALL_EVENT"; static constexpr char PERFORMANCE_DOMAIN[] = "PERFORMANCE"; -static constexpr char BUNDLE_MANAGER[] = "BUNDLE_MANAGER"; constexpr const char* AOT_COMPILE_SUMMARY = "AOT_COMPILE_SUMMARY"; constexpr const char* AOT_COMPILE_RECORD = "AOT_COMPILE_RECORD"; constexpr const char* QUERY_OF_CONTINUE_TYPE = "QUERY_OF_CONTINUE_TYPE"; @@ -55,7 +54,6 @@ constexpr const char* QUERY_BUNDLE_INFO = "QUERY_BUNDLE_INFO"; const char* EVENT_PARAM_PNAMEID = "PNAMEID"; const char* EVENT_PARAM_PVERSIONID = "PVERSIONID"; const char* EVENT_PARAM_USERID = "USERID"; -const char* EVENT_PARAM_UID = "UID"; const char* EVENT_PARAM_BUNDLE_NAME = "BUNDLE_NAME"; const char* EVENT_PARAM_ERROR_CODE = "ERROR_CODE"; const char* EVENT_PARAM_ABILITY_NAME = "ABILITY_NAME"; @@ -133,7 +131,6 @@ const char* FREE_SIZE = "freeSize"; const char* OPERATION_TYPE = "operationType"; const char* DB_NAME = "dbName"; const char* ERROR_CODE = "errorCode"; -const char* REBUILD_TYPE = "rebuildType"; const char* COMPONENT_NAME = "hisevent"; const char* PARTITION_NAME = "/data"; // query event diff --git a/services/bundlemgr/src/installd/installd_operator.cpp b/services/bundlemgr/src/installd/installd_operator.cpp index 0e02903cdafe35b1e757a65017df1522b8a45b5d..47872302e877c2729eb78e5db2389d7f2e8e7b74 100644 --- a/services/bundlemgr/src/installd/installd_operator.cpp +++ b/services/bundlemgr/src/installd/installd_operator.cpp @@ -1709,7 +1709,6 @@ ErrCode InstalldOperator::CheckEncryption(const CheckEncryptionParam &checkEncry return CheckHapEncryption(checkEncryptionParam, isEncryption); } const std::string cpuAbi = checkEncryptionParam.cpuAbi; - const int32_t bundleId = checkEncryptionParam.bundleId; InstallBundleType installBundleType = checkEncryptionParam.installBundleType; const bool isCompressNativeLibrary = checkEncryptionParam.isCompressNativeLibrary; LOG_D(BMS_TAG_INSTALLD, "a %{public}s, t %{public}d, p %{public}s", checkEncryptionParam.appIdentifier.c_str(), @@ -1758,7 +1757,6 @@ ErrCode InstalldOperator::CheckEncryption(const CheckEncryptionParam &checkEncry ErrCode InstalldOperator::CheckHapEncryption(const CheckEncryptionParam &checkEncryptionParam, bool &isEncryption) { const std::string hapPath = checkEncryptionParam.modulePath; - const int32_t bundleId = checkEncryptionParam.bundleId; InstallBundleType installBundleType = checkEncryptionParam.installBundleType; const bool isCompressNativeLibrary = checkEncryptionParam.isCompressNativeLibrary; LOG_D(BMS_TAG_INSTALLD, "p %{public}s, t %{public}d, " diff --git a/services/bundlemgr/src/status_receiver_proxy.cpp b/services/bundlemgr/src/status_receiver_proxy.cpp index 74188c3a8e5231d4126222ffa403bdd4014c3c76..cfe95489c61080cea1aa03d44b91e832309d0976 100644 --- a/services/bundlemgr/src/status_receiver_proxy.cpp +++ b/services/bundlemgr/src/status_receiver_proxy.cpp @@ -218,7 +218,6 @@ const char* MSG_ERR_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED const char* MSG_ERR_INSTALLD_COPY_FILE_FAILED = "[MSG_ERR_INSTALLD_COPY_FILE_FAILED]"; const char* MSG_ERR_INSTALL_GWP_ASAN_ENABLED_NOT_SAME = "[MSG_ERR_INSTALL_GWP_ASAN_ENABLED_NOT_SAME]"; const char* MSG_ERR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED = "[MSG_ERR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED]"; -const char* MSG_ERR_INSTALL_PGO_FILE_IS_INVALID = "[MSG_ERR_INSTALL_PGO_FILE_IS_INVALID]"; const char* MSG_ERR_INSTALL_CHECK_ENCRYPTION_FAILED = "[MSG_ERR_INSTALL_CHECK_ENCRYPTION_FAILED]"; const char* MSG_ERR_INSTALL_CODE_SIGNATURE_DELIVERY_FILE_FAILED = "[MSG_ERR_INSTALL_CODE_SIGNATURE_DELIVERY_FILE_FAILED]"; @@ -240,8 +239,6 @@ const char* MSG_ERR_INSTALL_OS_INTEGRATION_BUNDLE_NOT_ALLOWED_FOR_SHELL = "[MSG_ERR_INSTALL_OS_INTEGRATION_BUNDLE_NOT_ALLOWED_FOR_SHELL ]"; const char* MSG_ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL = "[MSG_ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL]"; -const char* MSG_ERR_APPEXECFWK_INSTALL_FORCE_UNINSTALLED_BUNDLE_NOT_ALLOW_RECOVER = - "[MSG_ERR_APPEXECFWK_INSTALL_FORCE_UNINSTALLED_BUNDLE_NOT_ALLOW_RECOVER]"; const char* MSG_ERR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED = "[MSG_ERR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED]"; const char* MSG_ERR_INSTALL_U1ENABLE_CAN_ONLY_INSTALL_IN_U1_WITH_NOT_SINGLETON =