diff --git a/frameworks/js/napi/update/common/src/client_helper.cpp b/frameworks/js/napi/update/common/src/client_helper.cpp index 758a181b48d1afa2b18ccd4f96fbb3c747e22cb3..e60bc296f8126dea8515b3707907bb005bb93f8f 100644 --- a/frameworks/js/napi/update/common/src/client_helper.cpp +++ b/frameworks/js/napi/update/common/src/client_helper.cpp @@ -379,17 +379,7 @@ void ParseBusinessType(napi_env env, const napi_value arg, UpgradeInfo &upgradeI NapiCommonUtils::GetInt32(env, businessTypeValue, "subType", subType); upgradeInfo.businessType.subType = static_cast(subType); } - if (upgradeInfo.businessType.subType == BusinessSubType::ROLLBACK) { - ENGINE_LOGI("ParseBusinessType: subType is rollback"); - return; - } - if (upgradeInfo.businessType.subType == BusinessSubType::ACCESSORY) { - ENGINE_LOGI("ParseBusinessType: subType is accessory"); - return; - } - if (upgradeInfo.businessType.subType != BusinessSubType::PARAM) { - upgradeInfo.businessType.subType = BusinessSubType::FIRMWARE; - } + upgradeInfo.businessType.subType = BusinessSubType::FIRMWARE; } ClientStatus ClientHelper::GetUpgradeInfoFromArg(napi_env env, const napi_value arg, UpgradeInfo &upgradeInfo) @@ -563,8 +553,7 @@ ClientStatus ParseUpgradeFile(napi_env env, const napi_value arg, UpgradeFile &u int32_t fileType = 0; NapiCommonUtils::GetInt32(env, arg, "fileType", fileType); - static const std::list enumList = { ComponentType::OTA, ComponentType::PATCH, ComponentType::COTA, - ComponentType::PARAM }; + static const std::list enumList = { ComponentType::OTA }; PARAM_CHECK(IsValidEnum(enumList, fileType), return ClientStatus::CLIENT_INVALID_PARAM, "ParseUpgradeFile error, invalid fileType:%{public}d", fileType); upgradeFile.fileType = static_cast(fileType); diff --git a/frameworks/js/napi/update/src/define_property.cpp b/frameworks/js/napi/update/src/define_property.cpp index b4bddcafcd95828f4abfdbd72ef6b5d06f2a320c..c5c007654937b6184f76e3c290a280f140fbdaaf 100644 --- a/frameworks/js/napi/update/src/define_property.cpp +++ b/frameworks/js/napi/update/src/define_property.cpp @@ -110,10 +110,7 @@ void DefineProperty::DefineUpgradeStatus(napi_env env, napi_value exports) void DefineProperty::DefineComponentType(napi_env env, napi_value exports) { std::vector> componentTypeList = { - DECLARE_ENUM_PROPERTY(ComponentType::OTA), - DECLARE_ENUM_PROPERTY(ComponentType::PATCH), - DECLARE_ENUM_PROPERTY(ComponentType::COTA), - DECLARE_ENUM_PROPERTY(ComponentType::PARAM) + DECLARE_ENUM_PROPERTY(ComponentType::OTA) }; NapiCommonUtils::CreateProperty(env, exports, "ComponentType", componentTypeList); } @@ -155,8 +152,7 @@ void DefineProperty::DefineOrder(napi_env env, napi_value exports) void DefineProperty::DefineEventClassify(napi_env env, napi_value exports) { std::vector> eventClassifyList = { - DECLARE_ENUM_PROPERTY(EventClassify::TASK), - DECLARE_ENUM_PROPERTY(EventClassify::SYSTEM) + DECLARE_ENUM_PROPERTY(EventClassify::TASK) }; NapiCommonUtils::CreateProperty(env, exports, "EventClassify", eventClassifyList); } @@ -164,9 +160,7 @@ void DefineProperty::DefineEventClassify(napi_env env, napi_value exports) void DefineProperty::DefineBusinessSubType(napi_env env, napi_value exports) { std::vector> businessSubTypeList = { - DECLARE_ENUM_PROPERTY(BusinessSubType::FIRMWARE), - DECLARE_ENUM_PROPERTY(BusinessSubType::PARAM), - DECLARE_ENUM_PROPERTY(BusinessSubType::ROLLBACK) + DECLARE_ENUM_PROPERTY(BusinessSubType::FIRMWARE) }; NapiCommonUtils::CreateProperty(env, exports, "BusinessSubType", businessSubTypeList); } @@ -213,11 +207,7 @@ void DefineProperty::DefineEventId(napi_env env, napi_value exports) DECLARE_ENUM_PROPERTY(EventId::EVENT_AUTH_START), DECLARE_ENUM_PROPERTY(EventId::EVENT_AUTH_SUCCESS), DECLARE_ENUM_PROPERTY(EventId::EVENT_DOWNLOAD_CANCEL), - DECLARE_ENUM_PROPERTY(EventId::EVENT_INITIALIZE), - DECLARE_ENUM_PROPERTY(EventId::EVENT_TASK_CHANGE), - DECLARE_ENUM_PROPERTY(EventId::EVENT_VERSION_INFO_CHANGE), - DECLARE_ENUM_PROPERTY(EventId::SYSTEM_BASE), - DECLARE_ENUM_PROPERTY(EventId::SYSTEM_BOOT_COMPLETE) + DECLARE_ENUM_PROPERTY(EventId::EVENT_INITIALIZE) }; NapiCommonUtils::CreateProperty(env, exports, "EventId", eventIdList); } @@ -226,8 +216,7 @@ void DefineProperty::DefineUpgradeAction(napi_env env, napi_value exports) { std::vector> upgradeActionList = { DECLARE_STRING_PROPERTY(UpgradeAction::UPGRADE), - DECLARE_STRING_PROPERTY(UpgradeAction::RECOVERY), - DECLARE_STRING_PROPERTY(UpgradeAction::ROLLBACK) + DECLARE_STRING_PROPERTY(UpgradeAction::RECOVERY) }; NapiCommonUtils::CreateProperty(env, exports, "UpgradeAction", upgradeActionList); } diff --git a/interfaces/inner_api/feature/update/model/common/upgrade_status.h b/interfaces/inner_api/feature/update/model/common/upgrade_status.h index 21f97c439d0e4ac9b5128003283923064ca1319f..9cbeb16c58c7398f2e754d955a4a54b20ce81e5b 100644 --- a/interfaces/inner_api/feature/update/model/common/upgrade_status.h +++ b/interfaces/inner_api/feature/update/model/common/upgrade_status.h @@ -30,9 +30,6 @@ enum class UpgradeStatus { VERIFYING = 30, VERIFY_FAIL, VERIFY_SUCCESS, - AUTHING, - AUTH_FAIL, - AUTH_SUCCESS, PACKAGE_TRANSING = 70, PACKAGE_TRANS_FAIL, PACKAGE_TRANS_SUCCESS, diff --git a/interfaces/inner_api/feature/update/model/event/event_classify.h b/interfaces/inner_api/feature/update/model/event/event_classify.h index 4b70e86c8093bf9839d1da7142393658fcbb7ba4..4d6075c01dd01dcc2f3df4d50c62cc4300d4d6a6 100644 --- a/interfaces/inner_api/feature/update/model/event/event_classify.h +++ b/interfaces/inner_api/feature/update/model/event/event_classify.h @@ -20,10 +20,9 @@ namespace OHOS::UpdateEngine { enum class EventClassify { - TASK = 0x01000000, - SYSTEM = 0x02000000, + TASK = 0x01000000 }; -const std::list g_eventClassifyList = { EventClassify::TASK, EventClassify::SYSTEM }; +const std::list g_eventClassifyList = { EventClassify::TASK }; } // namespace OHOS::UpdateEngine #endif // UPDATE_SERVICE_EVENT_CLASSIFY_H diff --git a/interfaces/inner_api/feature/update/model/event/event_id.h b/interfaces/inner_api/feature/update/model/event/event_id.h index 11e13724748de4295b4d9b5eb105a2873e2335c3..a5e1d2eb913afbb3bba238be01635508cc7053f1 100644 --- a/interfaces/inner_api/feature/update/model/event/event_id.h +++ b/interfaces/inner_api/feature/update/model/event/event_id.h @@ -41,11 +41,7 @@ enum class EventId { EVENT_AUTH_START, EVENT_AUTH_SUCCESS, EVENT_DOWNLOAD_CANCEL, - EVENT_INITIALIZE, - EVENT_TASK_CHANGE, - EVENT_VERSION_INFO_CHANGE, - SYSTEM_BASE = CAST_UINT(EventClassify::SYSTEM), - SYSTEM_BOOT_COMPLETE, + EVENT_INITIALIZE }; } // namespace OHOS::UpdateEngine #endif // UPDATE_SERVICE_EVENT_ID_H diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/business_sub_type.h b/interfaces/inner_api/feature/update/model/upgrade_info/business_sub_type.h index d37e39296d6b0d54801b8503658b6bd23e125e01..a457007cfaf1ecbe106e13e8e1673c59fec9cce5 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/business_sub_type.h +++ b/interfaces/inner_api/feature/update/model/upgrade_info/business_sub_type.h @@ -18,11 +18,8 @@ namespace OHOS::UpdateEngine { enum class BusinessSubType { - START_UP = 0, FIRMWARE = 1, - PARAM = 2, - ROLLBACK = 3, - ACCESSORY = 4 + PARAM = 2 }; } // namespace OHOS::UpdateEngine: #endif // UPDATE_SERVICE_BUSINESS_SUB_TYPE_H diff --git a/interfaces/inner_api/feature/update/model/upgrade_info/upgrade_info.h b/interfaces/inner_api/feature/update/model/upgrade_info/upgrade_info.h index c604c500e588d35fd216033495dabc95dae87db1..03bbb95037f68d549ceba5637a8203774af3fc58 100644 --- a/interfaces/inner_api/feature/update/model/upgrade_info/upgrade_info.h +++ b/interfaces/inner_api/feature/update/model/upgrade_info/upgrade_info.h @@ -36,7 +36,7 @@ struct UpgradeInfo { if (upgradeApp != other.upgradeApp) { return upgradeApp < other.upgradeApp; } - + if (businessType != other.businessType) { return businessType < other.businessType; } diff --git a/interfaces/inner_api/feature/update/model/version_info/component_type.h b/interfaces/inner_api/feature/update/model/version_info/component_type.h index 55538de9533cd20233a00c790b0de07a7221330b..f7cfc7d6b63ae45adfb51bd6e77fe4817138cb73 100644 --- a/interfaces/inner_api/feature/update/model/version_info/component_type.h +++ b/interfaces/inner_api/feature/update/model/version_info/component_type.h @@ -19,11 +19,7 @@ namespace OHOS::UpdateEngine { enum class ComponentType { INVALID = 0, - OTA = 1, - PATCH = 2, - COTA = 4, - PARAM = 8, - SA = 16 + OTA = 1 }; } // namespace OHOS::UpdateEngine #endif // UPDATE_SERVICE_COMPONENT_TYPE_H diff --git a/interfaces/inner_api/feature/update/model/version_info/upgrade_action.h b/interfaces/inner_api/feature/update/model/version_info/upgrade_action.h index 2b7b8b15943308e5d8ce6bbe2fdee6fc84c74952..3f8392dc1c7414b5680d70e5c75b7d7b21bbc635 100644 --- a/interfaces/inner_api/feature/update/model/version_info/upgrade_action.h +++ b/interfaces/inner_api/feature/update/model/version_info/upgrade_action.h @@ -21,7 +21,6 @@ class UpgradeAction { public: static constexpr const char *UPGRADE = "upgrade"; static constexpr const char *RECOVERY = "recovery"; - static constexpr const char *ROLLBACK = "rollback"; }; } // namespace OHOS::UpdateEngine #endif // UPDATE_SERVICE_UPGRADE_ACTION_H diff --git a/services/core/ability/model/include/package_type.h b/services/core/ability/model/include/package_type.h index d01cc4f65aa054104b21605f096c76f311b497dc..cffb64cb84b006a63d26cb9fb451358d2eb5467e 100644 --- a/services/core/ability/model/include/package_type.h +++ b/services/core/ability/model/include/package_type.h @@ -19,14 +19,7 @@ namespace OHOS::UpdateEngine { enum class PackageType { DYNAMIC = 0, - NORMAL = 1, - BASE = 2, - CUST = 3, - PRELOAD = 4, - COTA = 5, - VERSION = 6, - PATCH = 8, - SA = 9 + NORMAL = 1 }; } // namespace OHOS::UpdateEngine #endif // UPDATE_SERVICE_PACKAGE_TYPE_H