diff --git a/common/src/main/ets/util/FormatUtils.ts b/common/src/main/ets/util/FormatUtils.ts index 9fcc3a21c0b16b341869ea840a844c9b15e97434..bb302209ad90fc83ab8454ca879f5f908d559d8e 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 93695711e79c5ca53d9c3f0733532f481a58bb08..2cf7834ec66adc369bd5c4161de1b0b03728044b 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 e7cd99116668d49a0b703dd36134a25178fb270e..6f6a25eefc1246ab0a1ceae63dfe20910751dcce 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); }