From 271736717b22b2ad18f337c5228dbabe5753446e Mon Sep 17 00:00:00 2001 From: liuxy0216 <1952288230@qq.com> Date: Fri, 2 Sep 2022 16:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=9A=E8=AF=9D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=90=AF=E5=8A=A8Trace=E6=89=93=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuxy0216 <1952288230@qq.com> --- callui/src/main/ets/default/pages/index.ets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/callui/src/main/ets/default/pages/index.ets b/callui/src/main/ets/default/pages/index.ets index c915c72..097bb43 100644 --- a/callui/src/main/ets/default/pages/index.ets +++ b/callui/src/main/ets/default/pages/index.ets @@ -30,6 +30,7 @@ import HiLog from '../common/utils/Hilog'; import bundle from '@ohos.bundle'; import abilityAccessCtrl from "@ohos.abilityAccessCtrl"; import featureAbility from "@ohos.ability.featureAbility" +import byTrace from "@ohos.bytrace" const TAG = "Index"; const prefixLog = 'callUI app:@ohos.telephony.call:'; @@ -90,6 +91,7 @@ export default struct Index { aboutToAppear(): void { HiLog.i(TAG, "aboutToAppear :") + byTrace.startTrace('aboutToAppear', 0); this.callStateConst = new CallStateConst(); this.notificationManager = new NotificationManager(); globalThis.callManager = new CallManager(this) @@ -97,13 +99,16 @@ export default struct Index { let delayMethod = setTimeout(() => { clearTimeout(delayMethod); }, SIM_CARD_DELAYED_DISPLAY); + byTrace.finishTrace('aboutToAppear', 0); } onPageShow() { HiLog.i(TAG, "onPageShow : ") + byTrace.startTrace('onPageShow', 1); this.appInactiveState = false; this.notificationManager.cancelNotification(); this.notificationManager.sendCapsuleNotification(this.callData, false); + byTrace.finishTrace('onPageShow', 1); HiLog.i(TAG, "onPageShow end : ") }