From e98a32c17ed4796486000f0568df395a729a9f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE?= Date: Tue, 25 Jun 2024 15:52:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9sdk=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF=20Signed-off-by:=20?= =?UTF-8?q?=E9=82=B9=E5=8F=8B=E6=9D=BE=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/ets/util/FormatUtils.ts | 6 +++--- feature/ota/src/main/ets/manager/OtaUpdateManager.ets | 2 +- product/oh/base/src/main/ets/ServiceExtAbility/service.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/src/main/ets/util/FormatUtils.ts b/common/src/main/ets/util/FormatUtils.ts index 9fcc3a2..bb30220 100644 --- a/common/src/main/ets/util/FormatUtils.ts +++ b/common/src/main/ets/util/FormatUtils.ts @@ -15,7 +15,7 @@ import type common from '@ohos.app.ability.common'; import { DeviceUtils } from '../util/DeviceUtils'; -import { Logutils } from '../LogUtils'; +import { LogUtils } from './LogUtils'; /** * 格式化工具 @@ -113,7 +113,7 @@ export namespace FormatUtils { try { return JSON.stringify(value); } catch (exception) { - Logutils.error('FormateUtils', 'JSON.stringify failed !!'); + LogUtils.error('FormateUtils', 'JSON.stringify failed !!'); return ''; } } @@ -133,7 +133,7 @@ export namespace FormatUtils { try { return JSON.parse(content) as T; } catch (exception) { - Logutils.error('FormateUtils', 'paramJson failed !!'); + LogUtils.error('FormateUtils', 'paramJson failed !!'); } return null; } diff --git a/feature/ota/src/main/ets/manager/OtaUpdateManager.ets b/feature/ota/src/main/ets/manager/OtaUpdateManager.ets index 9369571..2cf7834 100644 --- a/feature/ota/src/main/ets/manager/OtaUpdateManager.ets +++ b/feature/ota/src/main/ets/manager/OtaUpdateManager.ets @@ -389,7 +389,7 @@ export class OtaUpdateManager { } private wantParser(want: Want): update.EventInfo { - let eventInfo: update.EventInfo = want?.parameters?.[OtaUpdateManager.KEY]; + let eventInfo: update.EventInfo = want?.parameters?.[OtaUpdateManager.KEY] as update.EventInfo; if (typeof eventInfo === 'string') { eventInfo = FormatUtils.parseJson(eventInfo); } diff --git a/product/oh/base/src/main/ets/ServiceExtAbility/service.ts b/product/oh/base/src/main/ets/ServiceExtAbility/service.ts index e7cd991..6f6a25e 100644 --- a/product/oh/base/src/main/ets/ServiceExtAbility/service.ts +++ b/product/oh/base/src/main/ets/ServiceExtAbility/service.ts @@ -77,7 +77,7 @@ export default class ServiceExtAbility extends Extension { OtaUpdateManager.getInstance().handleWant(want, globalThis.extensionContext); } - onDisconnect(want: want) { + onDisconnect(want: Want) { LogUtils.info(ServiceExtAbility.TAG, `onDisconnect, want: ${want?.abilityName}`); this.stopSelf(ServiceExtAbility.START_ID_CONNECT); } -- Gitee