From 011df2b0a0229be357ddea0b81f443bf4488db4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=86=AC=E5=86=AC=E5=86=AC?= Date: Mon, 8 Sep 2025 21:40:22 +0800 Subject: [PATCH 1/3] Message:fixCodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郑冬冬冬 --- api/@ohos.bundle.bundleManager.d.ts | 9 +++ ...os.hiviewdfx.FaultLogExtensionAbility.d.ts | 76 +++++++++++++++++++ ...os.hiviewdfx.FaultLogExtensionContext.d.ts | 32 ++++++++ kits/@kit.PerformanceAnalysisKit.d.ts | 6 +- 4 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts create mode 100644 api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 51d2a6b6ba..9b6d2962e2 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -987,6 +987,15 @@ declare namespace bundleManager { */ WEB_NATIVE_MESSAGING = 32, + /** + * Indicates extension info with type of the faultLog + * + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @atomicservice + * @since 21 dynamic + */ + FAULT_LOG = 33, + /** * Indicates extension info with type of unspecified * diff --git a/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts b/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts new file mode 100644 index 0000000000..87ecee1e94 --- /dev/null +++ b/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2025 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. + */ + +/** + * @file + * @kit PerformanceAnalysisKit + */ + +import type FaultLogExtensionContext from './@ohos.hiviewdfx.FaultLogExtensionContext'; + +/** + * Class of the FaultLog extension ability. + * + * @syscap SystemCapability.HiviewDFX.FaultLogger + * @StageModelOnly + * @since 21 dynamic +*/ +declare class FaultLogExtensionAbility { + /** + * Indicates FaultLog extension ability context. + * + * @type { FaultLogExtensionContext } + * @syscap SystemCapability.HiviewDFX.FaultLogger + * @StageModelOnly + * @since 21 dynamic + */ + context: FaultLogExtensionContext; + + /** + * Called back when a FaultLog extension is ready to report fault. + * + * @syscap SystemCapability.HiviewDFX.FaultLogger + * @StageModelOnly + * @since 21 dynamic + */ + onFaultReportReady(): void; + + /** + * Called back when a FaultLog extension is connected. + * + * @syscap SystemCapability.HiviewDFX.FaultLogger + * @StageModelOnly + * @since 21 dynamic + */ + onConnect(): void; + + /** + * Called back when a FaultLog extension is disconnected. + * + * @syscap SystemCapability.HiviewDFX.FaultLogger + * @StageModelOnly + * @since 21 dynamic + */ + onDisConnect(): void; +} + +/** + * Class of the FaultLog extension ability. + * + * @syscap SystemCapability.HiviewDFX.FaultLogger + * @StageModelOnly + * @since 21 dynamic + */ +export default FaultLogExtensionAbility; \ No newline at end of file diff --git a/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts b/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts new file mode 100644 index 0000000000..55e9f22891 --- /dev/null +++ b/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 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. + */ + +/** + * @file + * @kit PerformanceAnalysisKit + */ + +import ExtensionContext from './application/ExtensionContext'; + +/** + * The context of FaultLog extension. + * + * @extends ExtensionContext + * @syscap SystemCapability.HiviewDFX.FaultLogger + * @StageModelOnly + * @since 21 dynamic + */ +export default class FaultLogExtensionContext extends ExtensionContext { +} \ No newline at end of file diff --git a/kits/@kit.PerformanceAnalysisKit.d.ts b/kits/@kit.PerformanceAnalysisKit.d.ts index 971f1c851f..e1530e9922 100644 --- a/kits/@kit.PerformanceAnalysisKit.d.ts +++ b/kits/@kit.PerformanceAnalysisKit.d.ts @@ -28,10 +28,12 @@ import hiSysEvent from '@ohos.hiSysEvent'; import hiTraceChain from '@ohos.hiTraceChain'; import hiTraceMeter from '@ohos.hiTraceMeter'; import logLibrary from '@ohos.logLibrary'; +import FaultLogExtensionAbility from '@ohos.hiviewdfx.FaultLogExtensionAbility'; +import FaultLogExtensionContext from '@ohos.hiviewdfx.FaultLogExtensionContext'; export { FaultLogger, hiAppEvent, hiSysEvent, hiTraceChain, hiTraceMeter, hichecker, hidebug, hilog, - logLibrary + logLibrary, FaultLogExtensionAbility, FaultLogExtensionContext }; /*** endif */ @@ -39,6 +41,6 @@ export { import jsLeakWatcher from '@ohos.hiviewdfx.jsLeakWatcher'; export { - jsLeakWatcher + jsLeakWatcher }; /*** endif */ -- Gitee From 4caef98ae76afecc91fc9df45f14093af856e09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=86=AC=E5=86=AC=E5=86=AC?= Date: Fri, 12 Sep 2025 02:50:51 +0000 Subject: [PATCH 2/3] update api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郑冬冬冬 --- ...os.hiviewdfx.FaultLogExtensionAbility.d.ts | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts b/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts index 1314982434..bc667d65c9 100644 --- a/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts +++ b/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts @@ -1,6 +1,6 @@ /* * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); + * 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 * @@ -23,60 +23,54 @@ import type FaultLogExtensionContext from './@ohos.hiviewdfx.FaultLogExtensionCo /** * Class of the FaultLog extension ability. * - * @syscap SystemCapability.HiviewDFX.FaultLogger - * @StageModelOnly + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly * @since 21 dynamic - * @since 22 static -*/ + */ declare class FaultLogExtensionAbility { /** * Indicates FaultLog extension ability context. * * @type { FaultLogExtensionContext } - * @syscap SystemCapability.HiviewDFX.FaultLogger - * @StageModelOnly + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly * @since 21 dynamic - * @since 22 static */ context: FaultLogExtensionContext; /** * Called back when a FaultLog extension is ready to report fault. * - * @syscap SystemCapability.HiviewDFX.FaultLogger - * @StageModelOnly + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly * @since 21 dynamic - * @since 22 static */ onFaultReportReady(): void; /** * Called back when a FaultLog extension is connected. * - * @syscap SystemCapability.HiviewDFX.FaultLogger - * @StageModelOnly + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly * @since 21 dynamic - * @since 22 static */ onConnect(): void; /** * Called back when a FaultLog extension is disconnected. * - * @syscap SystemCapability.HiviewDFX.FaultLogger - * @StageModelOnly + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly * @since 21 dynamic - * @since 22 static */ - onDisConnect(): void; + onDisconnect(): void; } /** * Class of the FaultLog extension ability. * - * @syscap SystemCapability.HiviewDFX.FaultLogger - * @StageModelOnly + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly * @since 21 dynamic - * @since 22 static */ -export default FaultLogExtensionAbility; \ No newline at end of file +export default FaultLogExtensionAbility; -- Gitee From b17dc867619e8d1f006b058ad2ffb21c278aa28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=86=AC=E5=86=AC=E5=86=AC?= Date: Fri, 12 Sep 2025 02:52:20 +0000 Subject: [PATCH 3/3] update api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 郑冬冬冬 --- api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts b/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts index cf594f6056..5d8e774f17 100644 --- a/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts +++ b/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts @@ -19,15 +19,13 @@ */ import ExtensionContext from './application/ExtensionContext'; - /** * The context of FaultLog extension. * * @extends ExtensionContext - * @syscap SystemCapability.HiviewDFX.FaultLogger - * @StageModelOnly + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly * @since 21 dynamic - * @since 22 static */ export default class FaultLogExtensionContext extends ExtensionContext { -} \ No newline at end of file +} -- Gitee