From 6d57a88805c15b739400fb505d732e0589217572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E7=8F=9E=E9=A3=8E?= Date: Mon, 21 Feb 2022 09:22:52 +0000 Subject: [PATCH 1/5] =?UTF-8?q?update=20utils/bundle=5Flite/adapter.h.=20?= =?UTF-8?q?=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/bundle_lite/adapter.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/bundle_lite/adapter.h b/utils/bundle_lite/adapter.h index 7cdc82b..ee08967 100755 --- a/utils/bundle_lite/adapter.h +++ b/utils/bundle_lite/adapter.h @@ -76,8 +76,7 @@ const unsigned int RETRY_TIMES = 10; } \ } while (0) -#define APP_ERRCODE_EXTRA(code1, code2) -#define APP_EVENT(code1) + #define RecordAbiityInfoEvt(code1) #define MutexDelete(a) osMutexDelete(a) #define MutexAcquire(a, b) osMutexAcquire(a, b) -- Gitee From 07a45072eee519d141dd9c1f39ae53d07548f74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E7=8F=9E=E9=A3=8E?= Date: Mon, 21 Feb 2022 09:27:05 +0000 Subject: [PATCH 2/5] =?UTF-8?q?update=20services/bundlemgr=5Flite/src/gt?= =?UTF-8?q?=5Fbundle=5Fmanager=5Fservice.cpp.=20=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/bundlemgr_lite/src/gt_bundle_manager_service.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/bundlemgr_lite/src/gt_bundle_manager_service.cpp b/services/bundlemgr_lite/src/gt_bundle_manager_service.cpp index 99b3717..74d7b52 100755 --- a/services/bundlemgr_lite/src/gt_bundle_manager_service.cpp +++ b/services/bundlemgr_lite/src/gt_bundle_manager_service.cpp @@ -14,7 +14,8 @@ */ #include "gt_bundle_manager_service.h" - +#include "aafwk_event_error__id.h" +#include "aafwk_event_error_code.h" #include "ability_info_utils.h" #include "ability_message_id.h" #include "appexecfwk_errors.h" @@ -36,6 +37,8 @@ #include "utils.h" #include "want.h" +using namespace OHOS::ACELite; + namespace OHOS { const uint8_t OPERATION_DOING = 200; const uint8_t BMS_INSTALLATION_START = 101; -- Gitee From eed5b0ba53b163ac914731a67f659b9b168dcae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E7=8F=9E=E9=A3=8E?= Date: Mon, 21 Feb 2022 09:31:40 +0000 Subject: [PATCH 3/5] =?UTF-8?q?add=20utils/bundle=5Flite/aafwk=5Fevent=5Fe?= =?UTF-8?q?rror=5F=5Fid.h.=20=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/bundle_lite/aafwk_event_error__id.h | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 utils/bundle_lite/aafwk_event_error__id.h diff --git a/utils/bundle_lite/aafwk_event_error__id.h b/utils/bundle_lite/aafwk_event_error__id.h new file mode 100644 index 0000000..611dfa8 --- /dev/null +++ b/utils/bundle_lite/aafwk_event_error__id.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// event codes +#define MT_ACE_APP_START 0x00 +#define MT_ACE_APP_ACTIVE 0x01 +#define MT_ACE_APP_BACKGROUND 0x02 +#define MT_ACE_APP_STOP 0x03 + +// error codes +#define EXCE_ACE_APP_START 0x01 +#define EXCE_ACE_APP_SCAN 0x07 + +#define EXCE_ACE_APP_START_UNKNOWN_BUNDLE_INFO 0x0 +#define EXCE_ACE_APP_STOP_NO_ABILITY_RUNNING 0x5 +#define EXCE_ACE_APP_STOP_UNKNOWN_ABILITY_TOKEN 0x6 +#define EXCE_ACE_APP_START_CREATE_TSAK_FAILED 0x3 +#define EXCE_ACE_APP_START_LAUNCHER_EXIT_FAILED 0x4 + + +#define EXCE_ACE_APP_SCAN_INVALID_SYSTEM_APP 0x0 +#define EXCE_ACE_APP_SCAN_UNKNOWN_BUNDLE_INFO 0x3 +#define EXCE_ACE_APP_SCAN_PARSE_JSON_FALIED 0x1 +#define EXCE_ACE_APP_SCAN_PARSE_PROFILE_FALIED 0x2 \ No newline at end of file -- Gitee From 214ee67c1a19115c909c478bd701ba6732aea3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E7=8F=9E=E9=A3=8E?= Date: Mon, 21 Feb 2022 09:32:22 +0000 Subject: [PATCH 4/5] =?UTF-8?q?add=20utils/bundle=5Flite/aafwk=5Fevent=5Fe?= =?UTF-8?q?rror=5Fcode.cpp.=20=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/bundle_lite/aafwk_event_error_code.cpp | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 utils/bundle_lite/aafwk_event_error_code.cpp diff --git a/utils/bundle_lite/aafwk_event_error_code.cpp b/utils/bundle_lite/aafwk_event_error_code.cpp new file mode 100644 index 0000000..f293e1e --- /dev/null +++ b/utils/bundle_lite/aafwk_event_error_code.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020-2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include "aafwk_event_error_code.h" +#include "product_adapter.h" + +namespace OHOS { + +AafwkEventCodePrint *AafwkEventCodePrint::GetInstance() +{ + static AafwkEventCodePrint printInstance; + return &printInstance; +} + +void AafwkEventCodePrint::AafwkEventPrint(uint8_t info2, uint8_t info3) +{ + ProductAdapter::PrintEventTrace(0, info2, info3); +} + +void AafwkEventCodePrint::AafwkEventPrint(uint8_t info1, uint8_t info2, uint8_t info3) +{ + ProductAdapter::PrintEventTrace(info1, info2, info3); +} + +void AafwkEventCodePrint::AafwkErrorPrint(uint8_t info1, uint16_t info2) +{ + ProductAdapter::PrintErrCode(info1, info2); +} + + +} // namespace OHOS -- Gitee From c41bd943c10ce548f78a4801ba7c08eff86a118e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E7=8F=9E=E9=A3=8E?= Date: Mon, 21 Feb 2022 09:32:52 +0000 Subject: [PATCH 5/5] =?UTF-8?q?add=20utils/bundle=5Flite/aafwk=5Fevent=5Fe?= =?UTF-8?q?rror=5Fcode.h.=20=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/bundle_lite/aafwk_event_error_code.h | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 utils/bundle_lite/aafwk_event_error_code.h diff --git a/utils/bundle_lite/aafwk_event_error_code.h b/utils/bundle_lite/aafwk_event_error_code.h new file mode 100644 index 0000000..1b7c711 --- /dev/null +++ b/utils/bundle_lite/aafwk_event_error_code.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "memory_heap.h" + +#include "aafwk_event_error__id.h" + +#define APP_EVENT(code1) \ + AafwkEventCodePrint::GetInstance()->AafwkEventPrint(code1, 0) +#define APP_ERRCODE_EXTRA(code1, code2) \ + AafwkEventCodePrint::GetInstance()->AafwkErrorPrint(code1, code2) + +namespace OHOS { +namespace ACELite { +class AafwkEventCodePrint final : public MemoryHeap { +public: + + AafwkEventCodePrint() = default; + + ~AafwkEventCodePrint() = default; + + static AafwkEventCodePrint *GetInstance(); + + void AafwkEventPrint(uint8_t info2, uint8_t info3); + + void AafwkEventPrint(uint8_t info1, uint8_t info2, uint8_t info3); + + void AafwkErrorPrint(uint8_t info2, uint16_t info3); + +}; +} +} \ No newline at end of file -- Gitee