From 4800ad0469f93978d62c34a8c19d446f1c381505 Mon Sep 17 00:00:00 2001 From: 18671941053 Date: Mon, 12 Aug 2024 14:57:00 +0800 Subject: [PATCH] abc Signed-off-by: 18671941053 --- common/index.ets | 16 ----- common/index.ts | 71 +++++++++++++++++++ common/oh-package.json5 | 2 +- .../src/main/ets/default/CheckEmptyUtils.ts | 2 +- common/src/main/ets/default/Constants.ts | 2 +- common/src/main/ets/default/Decorators.ts | 2 +- common/src/main/ets/default/Log.ts | 2 +- common/src/main/ets/default/ReadConfigUtil.ts | 4 +- .../src/main/ets/default/ScreenLockCommon.ts | 4 +- .../src/main/ets/default/ScreenLockManager.ts | 4 +- .../main/ets/default/SingleInstanceHelper.ts | 4 +- .../main/ets/default/StyleConfiguration.ts | 2 +- common/src/main/ets/default/StyleManager.ts | 2 +- .../src/main/ets/default/SwitchUserManager.ts | 8 +-- common/src/main/ets/default/TimeManager.ts | 2 +- common/src/main/ets/default/Trace.ts | 4 +- .../default/abilitymanager/abilityManager.ts | 4 +- .../default/abilitymanager/bundleManager.ts | 6 +- .../main/ets/default/abilitymanager/index.ts | 5 ++ .../abilitymanager/notificationManager.ts | 14 ++-- .../default/commonEvent/CommonEventManager.ts | 2 +- .../src/main/ets/default/commonEvent/index.ts | 6 ++ common/src/main/ets/default/event/EventBus.ts | 2 +- .../main/ets/default/event/EventManager.ts | 6 +- .../src/main/ets/default/event/EventUtil.ts | 2 +- common/src/main/ets/default/event/index.ts | 7 ++ common/src/main/ets/default/index.ts | 37 ++++++++++ entry/oh-package.json5 | 4 +- .../src/main/ets/Application/AbilityStage.ts | 2 +- entry/src/main/ets/MainAbility/MainAbility.ts | 2 +- features/batterycomponent/oh-package.json5 | 4 +- .../src/main/ets/default/batteryModel.ts | 10 +-- .../ets/default/common/StyleConfiguration.ts | 1 + .../main/ets/default/pages/batteryIcon.ets | 4 +- .../src/main/ets/default/pages/batteryPic.ets | 2 +- .../src/main/ets/default/pages/batterySoc.ets | 4 +- features/clockcomponent/oh-package.json5 | 4 +- .../src/main/ets/default/app.ets | 2 +- .../src/main/ets/default/pages/clockIcon.ets | 12 ++-- features/datetimecomponent/oh-package.json5 | 4 +- .../ets/com/ohos/view/component/dateTime.ets | 4 +- .../main/ets/com/ohos/vm/dateTimeViewModel.ts | 9 +-- features/noticeitem/oh-package.json5 | 4 +- .../com/ohos/noticeItem/common/CommonUtil.ts | 2 +- .../noticeItem/common/ScrollbarManager.ts | 2 +- .../noticeItem/model/NotificationConfig.ts | 4 +- .../model/NotificationDistributionManager.ts | 2 +- .../noticeItem/model/NotificationManager.ts | 2 +- .../noticeItem/model/NotificationService.ts | 4 +- .../model/NotificationWindowManager.ts | 4 +- .../ohos/noticeItem/model/ParseDataUtil.ts | 6 +- .../noticeItem/model/rule/RuleController.ts | 4 +- .../view/NotificationListComponent.ets | 2 +- .../noticeItem/view/item/actionComponent.ets | 4 +- .../view/item/bannerNotificationItem.ets | 7 +- .../noticeItem/view/item/confirmDialog.ets | 2 +- .../ohos/noticeItem/view/item/customItem.ets | 2 +- .../noticeItem/view/item/devicesDialog.ets | 2 +- .../ohos/noticeItem/view/item/generalItem.ets | 4 +- .../ohos/noticeItem/view/item/groupItem.ets | 2 +- .../view/item/iconListComponent.ets | 2 +- .../noticeItem/view/item/notificationItem.ets | 2 +- .../ohos/noticeItem/view/item/pictureItem.ets | 2 +- .../noticeItem/view/item/settingDialog.ets | 6 +- .../ohos/noticeItem/view/item/titleItem.ets | 4 +- .../ohos/noticeItem/viewmodel/ViewModel.ts | 10 +-- features/screenlock/oh-package.json5 | 4 +- .../main/ets/com/ohos/model/accountsModel.ts | 10 +-- .../ets/com/ohos/model/screenLockModel.ts | 6 +- .../ets/com/ohos/model/screenLockService.ts | 8 +-- .../ets/com/ohos/model/screenlockStyle.ts | 2 +- .../ets/com/ohos/view/component/accounts.ets | 5 +- .../com/ohos/view/component/batterySoc.ets | 2 +- .../ets/com/ohos/view/component/customPSD.ets | 2 +- .../com/ohos/view/component/digitalPSD.ets | 2 +- .../ets/com/ohos/view/component/lockIcon.ets | 4 +- .../ets/com/ohos/view/component/mixedPSD.ets | 2 +- .../com/ohos/view/component/numkeyBoard.ets | 2 +- .../ets/com/ohos/view/component/statusBar.ets | 8 +-- .../src/main/ets/com/ohos/vm/StatusBarVM.ts | 5 +- .../main/ets/com/ohos/vm/accountsViewModel.ts | 2 +- .../src/main/ets/com/ohos/vm/baseViewModel.ts | 2 +- .../ets/com/ohos/vm/batterySocViewModel.ets | 2 +- .../ets/com/ohos/vm/customPSDViewModel.ts | 4 +- .../ets/com/ohos/vm/digitalPSDViewModel.ts | 4 +- .../main/ets/com/ohos/vm/lockIconViewModel.ts | 4 +- .../main/ets/com/ohos/vm/mixedPSDViewModel.ts | 4 +- features/shortcutcomponent/oh-package.json5 | 4 +- .../ets/com/ohos/view/component/shortcut.ets | 2 +- .../main/ets/com/ohos/vm/shortcutViewModel.ts | 2 +- features/signalcomponent/oh-package.json5 | 4 +- .../src/main/ets/default/app.ets | 2 +- .../src/main/ets/default/pages/signalIcon.ets | 4 +- .../src/main/ets/default/signalModel.ts | 2 +- features/wallpapercomponent/oh-package.json5 | 4 +- .../ets/com/ohos/view/component/wallpaper.ets | 4 +- .../ets/com/ohos/vm/wallpaperViewModel.ts | 2 +- features/wificomponent/oh-package.json5 | 4 +- .../src/main/ets/default/app.ets | 3 +- .../src/main/ets/default/pages/wifiIcon.ets | 4 +- .../src/main/ets/default/wifiModel.ts | 2 +- .../src/main/ets/Application/AbilityStage.ts | 2 +- .../ServiceExtAbility/ServiceExtAbility.ts | 4 +- .../src/main/ets/common/StyleConfiguration.ts | 2 +- .../pc/src/main/ets/common/StyleManager.ts | 8 +-- .../pc/src/main/ets/pages/customPassword.ets | 6 +- .../src/main/ets/pages/customscreenlock.ets | 2 +- .../pc/src/main/ets/pages/digitalPassword.ets | 6 +- product/pc/src/main/ets/pages/index.ets | 6 +- .../src/main/ets/pages/journalscreenlock.ets | 2 +- .../pc/src/main/ets/pages/mixedPassword.ets | 6 +- .../pc/src/main/ets/pages/slidescreenlock.ets | 2 +- product/pc/src/main/ets/vm/indexViewModel.ts | 2 +- .../main/ets/vm/slideScreenLockViewModel.ts | 2 +- product/phone/src/main/ets/AbilityStage.ts | 2 +- .../ServiceExtAbility/ServiceExtAbility.ts | 4 +- .../src/main/ets/common/StyleConfiguration.ts | 2 +- .../phone/src/main/ets/common/StyleManager.ts | 4 +- .../src/main/ets/pages/customPassword.ets | 6 +- .../src/main/ets/pages/customscreenlock.ets | 2 +- .../src/main/ets/pages/digitalPassword.ets | 6 +- product/phone/src/main/ets/pages/index.ets | 6 +- .../src/main/ets/pages/journalscreenlock.ets | 2 +- .../src/main/ets/pages/mixedPassword.ets | 6 +- .../src/main/ets/pages/slidescreenlock.ets | 2 +- .../phone/src/main/ets/vm/indexViewModel.ts | 2 +- .../main/ets/vm/slideScreenLockViewModel.ts | 2 +- 127 files changed, 367 insertions(+), 231 deletions(-) delete mode 100644 common/index.ets create mode 100644 common/index.ts create mode 100644 common/src/main/ets/default/abilitymanager/index.ts create mode 100644 common/src/main/ets/default/commonEvent/index.ts create mode 100644 common/src/main/ets/default/event/index.ts create mode 100644 common/src/main/ets/default/index.ts diff --git a/common/index.ets b/common/index.ets deleted file mode 100644 index 2cf6651..0000000 --- a/common/index.ets +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2021-2022 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. - */ - -export { MainPage } from './src/main/ets/components/MainPage/MainPage' diff --git a/common/index.ts b/common/index.ts new file mode 100644 index 0000000..3670c87 --- /dev/null +++ b/common/index.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2021-2022 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. + */ + +/* + * Copyright (c) 2021-2022 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. + */ + +export { + CheckEmptyUtils, + Constants, + DateTimeCommon, + Log, + ReadConfigUtil, + createOrGet, + StyleConfiguration, + StyleManager, + SwitchUserManager, + WriteFaultLog, + SysFaultLogger, + FaultID, + Trace, + TimeManager, + TimeEventArgs, + TIME_CHANGE_EVENT, + WindowType, + ScreenLockStatus, + ReadConfigFile +} from './src/main/ets/default' + +export { + AbilityManager, + BundleManager, + NotificationManager +} from './src/main/ets/default/abilitymanager' + +export { + CommonEventManager, + getCommonEventManager, + POLICY +} from './src/main/ets/default/commonEvent' + + +export { + EventManager, + unsubscribe, + obtainLocalEvent, + obtainStartAbility +} from './src/main/ets/default/event' diff --git a/common/oh-package.json5 b/common/oh-package.json5 index 51a1688..b67ddb6 100644 --- a/common/oh-package.json5 +++ b/common/oh-package.json5 @@ -4,7 +4,7 @@ "devDependencies": {}, "name": "@ohos/common", "description": "a npm package which contains arkUI2.0 page", - "main": "index.ets", + "main": "index.ts", "repository": {}, "version": "1.0.0", "dependencies": {} diff --git a/common/src/main/ets/default/CheckEmptyUtils.ts b/common/src/main/ets/default/CheckEmptyUtils.ts index 5061c49..f3df822 100644 --- a/common/src/main/ets/default/CheckEmptyUtils.ts +++ b/common/src/main/ets/default/CheckEmptyUtils.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -export default class CheckEmptyUtils { +export class CheckEmptyUtils { /** * Check obj is empty. diff --git a/common/src/main/ets/default/Constants.ts b/common/src/main/ets/default/Constants.ts index f70dab6..58c3d58 100644 --- a/common/src/main/ets/default/Constants.ts +++ b/common/src/main/ets/default/Constants.ts @@ -27,7 +27,7 @@ export interface Rect { export type WindowType = 'status' | 'navigation'; -export default class Constants { +export class Constants { static URI_VAR: string = 'dataability:///com.ohos.settingsdata.DataAbility'; static getUriSync(key: string): string { diff --git a/common/src/main/ets/default/Decorators.ts b/common/src/main/ets/default/Decorators.ts index 85cf5c5..3f851ce 100644 --- a/common/src/main/ets/default/Decorators.ts +++ b/common/src/main/ets/default/Decorators.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from "./Log"; +import {Log} from "./Log"; const TAG = "Decorators"; diff --git a/common/src/main/ets/default/Log.ts b/common/src/main/ets/default/Log.ts index de66714..e693497 100644 --- a/common/src/main/ets/default/Log.ts +++ b/common/src/main/ets/default/Log.ts @@ -37,7 +37,7 @@ export function filterKey(target: any, propKey: string, descriptor: PropertyDesc /** * Basic log class */ -export default class Log { +export class Log { /** * Outputs debug-level logs. * diff --git a/common/src/main/ets/default/ReadConfigUtil.ts b/common/src/main/ets/default/ReadConfigUtil.ts index 7332fdf..1276a7c 100644 --- a/common/src/main/ets/default/ReadConfigUtil.ts +++ b/common/src/main/ets/default/ReadConfigUtil.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import Log from './Log'; -import AbilityManager from '../default/abilitymanager/abilityManager' +import {Log} from './Log'; +import {AbilityManager} from '../default/abilitymanager/abilityManager' const TAG = 'ReadConfigUtil'; diff --git a/common/src/main/ets/default/ScreenLockCommon.ts b/common/src/main/ets/default/ScreenLockCommon.ts index 126c9d5..6fcf314 100644 --- a/common/src/main/ets/default/ScreenLockCommon.ts +++ b/common/src/main/ets/default/ScreenLockCommon.ts @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Log from './Log'; -import AbilityManager from '../default/abilitymanager/abilityManager' +import {Log} from './Log'; +import {AbilityManager} from '../default/abilitymanager/abilityManager' const TAG = 'ScreenLock-ScreenLockCommon'; export enum ScreenLockStatus { diff --git a/common/src/main/ets/default/ScreenLockManager.ts b/common/src/main/ets/default/ScreenLockManager.ts index d38431d..569cf5e 100644 --- a/common/src/main/ets/default/ScreenLockManager.ts +++ b/common/src/main/ets/default/ScreenLockManager.ts @@ -15,9 +15,9 @@ import commonEvent from "@ohos.commonEvent"; import { CommonEventSubscriber } from "commonEvent/commonEventSubscriber"; -import createOrGet from "./SingleInstanceHelper"; +import {createOrGet} from "./SingleInstanceHelper"; import EventManager from "./event/EventManager"; -import Log from "./Log"; +import {Log} from "./Log"; import { obtainLocalEvent } from "./event/EventUtil"; import { debounce } from "./Decorators"; export const SCREEN_CHANGE_EVENT = "screenChangeEvent"; diff --git a/common/src/main/ets/default/SingleInstanceHelper.ts b/common/src/main/ets/default/SingleInstanceHelper.ts index 00ab5d5..8f99c06 100644 --- a/common/src/main/ets/default/SingleInstanceHelper.ts +++ b/common/src/main/ets/default/SingleInstanceHelper.ts @@ -13,13 +13,13 @@ * limitations under the License. */ -import Log from './Log'; +import {Log} from './Log'; import audio from '@ohos.multimedia.audio'; const TAG = "SingleInstanceHelper"; const AUDIO_MANAGER_KEY = 'MultiMediaAudioManager'; -export default function createOrGet(objectClass: { new(): T }, storageKey: string): T { +export function createOrGet(objectClass: { new(): T }, storageKey: string): T { if (!globalThis[storageKey]) { globalThis[storageKey] = new objectClass(); Log.showDebug(TAG, `Create key of ${storageKey}`); diff --git a/common/src/main/ets/default/StyleConfiguration.ts b/common/src/main/ets/default/StyleConfiguration.ts index 35e326d..fa24da6 100644 --- a/common/src/main/ets/default/StyleConfiguration.ts +++ b/common/src/main/ets/default/StyleConfiguration.ts @@ -17,7 +17,7 @@ import StyleManager from './StyleManager'; const TAG = 'Common-StyleConfiguration'; -export default class StyleConfiguration { +export class StyleConfiguration { static getCommonStyle() { const key: string = TAG + "-Common"; return StyleManager.getStyle(key, () => { diff --git a/common/src/main/ets/default/StyleManager.ts b/common/src/main/ets/default/StyleManager.ts index 18fc5e6..eb5de48 100644 --- a/common/src/main/ets/default/StyleManager.ts +++ b/common/src/main/ets/default/StyleManager.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from './Log'; +import { Log } from './Log'; const TAG = 'Common-StyleManager'; diff --git a/common/src/main/ets/default/SwitchUserManager.ts b/common/src/main/ets/default/SwitchUserManager.ts index bee3bf7..c315317 100644 --- a/common/src/main/ets/default/SwitchUserManager.ts +++ b/common/src/main/ets/default/SwitchUserManager.ts @@ -14,8 +14,8 @@ */ import AccountManager from "@ohos.account.osAccount"; -import Log from "./Log"; -import getSingleInstance from "./SingleInstanceHelper"; +import {Log} from "./Log"; +import {createOrGet} from "./SingleInstanceHelper"; const TAG = "SwitchUserManagerSc"; const SUBSCRIBE_KEY = "SystemUiAccount"; @@ -59,13 +59,13 @@ function parseAccountInfo(accountInfo: AccountInfo): UserInfo { }; } -export default class SwitchUserManager { +export class SwitchUserManager { mUserInfo: UserInfo = new UserInfo(); mListeners = new Set(); mHasWait: boolean = false; static getInstance(): SwitchUserManager { - return getSingleInstance(SwitchUserManager, TAG); + return createOrGet(SwitchUserManager, TAG); } constructor() { diff --git a/common/src/main/ets/default/TimeManager.ts b/common/src/main/ets/default/TimeManager.ts index b890c95..46c2dcc 100644 --- a/common/src/main/ets/default/TimeManager.ts +++ b/common/src/main/ets/default/TimeManager.ts @@ -52,7 +52,7 @@ export function concatTime(h: number, m: number) { return `${fill(h)}:${fill(m)}`; } -class TimeManager { +export class TimeManager { private mUse24hFormat: boolean = false; private mSettingsHelper?: DataAbilityHelper; private mManager?: CommonEventManager; diff --git a/common/src/main/ets/default/Trace.ts b/common/src/main/ets/default/Trace.ts index ee7102a..e1ebd44 100644 --- a/common/src/main/ets/default/Trace.ts +++ b/common/src/main/ets/default/Trace.ts @@ -14,9 +14,9 @@ */ import byTrace from "@ohos.bytrace"; -import Log from "./Log"; +import {Log} from "./Log"; -export default class Trace { +export class Trace { static readonly CORE_METHOD_UNLOCK_SCREEN = "unlockScreen" static readonly CORE_METHOD_CALL_ACCOUNT_SYSTEM = "callAccountSubsystem"; static readonly CORE_METHOD_PASS_ACCOUNT_SYSTEM_RESULT = "passingAccountSubsystemResult"; diff --git a/common/src/main/ets/default/abilitymanager/abilityManager.ts b/common/src/main/ets/default/abilitymanager/abilityManager.ts index b244169..4869de0 100644 --- a/common/src/main/ets/default/abilitymanager/abilityManager.ts +++ b/common/src/main/ets/default/abilitymanager/abilityManager.ts @@ -13,11 +13,11 @@ * limitations under the License. */ -import Log from '../Log'; +import {Log} from '../Log'; const TAG = 'AbilityManager'; -export default class AbilityManager { +export class AbilityManager { static ABILITY_NAME_ENTRY = 'SystemUi_Entry'; static ABILITY_NAME_STATUS_BAR = 'SystemUi_StatusBar'; static ABILITY_NAME_NAVIGATION_BAR = 'SystemUi_NavigationBar'; diff --git a/common/src/main/ets/default/abilitymanager/bundleManager.ts b/common/src/main/ets/default/abilitymanager/bundleManager.ts index d4d55de..a4c3679 100644 --- a/common/src/main/ets/default/abilitymanager/bundleManager.ts +++ b/common/src/main/ets/default/abilitymanager/bundleManager.ts @@ -15,12 +15,12 @@ import BundleMgr from "@ohos.bundle"; import Context from "application/ServiceExtensionContext"; -import Log from "../Log"; -import SwitchUserManager from "../SwitchUserManager"; +import {Log} from "../Log"; +import {SwitchUserManager} from "../SwitchUserManager"; const TAG = "BRManager"; -export default class BundleManager { +export class BundleManager { static async getResourceManager(tag: string, context: Context, bundleName: string) { Log.showInfo(TAG, `getResourceManager from: ${tag}`); let bundleContext = await context.createBundleContext(bundleName) diff --git a/common/src/main/ets/default/abilitymanager/index.ts b/common/src/main/ets/default/abilitymanager/index.ts new file mode 100644 index 0000000..ddb5913 --- /dev/null +++ b/common/src/main/ets/default/abilitymanager/index.ts @@ -0,0 +1,5 @@ +export { AbilityManager } from './abilityManager' + +export { BundleManager } from './bundleManager' + +export { NotificationManager } from './notificationManager' diff --git a/common/src/main/ets/default/abilitymanager/notificationManager.ts b/common/src/main/ets/default/abilitymanager/notificationManager.ts index ad137fc..88b6e68 100644 --- a/common/src/main/ets/default/abilitymanager/notificationManager.ts +++ b/common/src/main/ets/default/abilitymanager/notificationManager.ts @@ -15,39 +15,39 @@ //import { NotificationSubscriber } from './notification/notificationSubscriber'; import Notification from '@ohos.notification'; -import Log from '../Log'; +import {Log} from '../Log'; const TAG = 'NotificationManager'; -export default class NotificationManager { +export class NotificationManager { static TYPE_BASIC: number = Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT; static TYPE_LONG: number = Notification.ContentType.NOTIFICATION_CONTENT_LONG_TEXT; static TYPE_MULTI: number = Notification.ContentType.NOTIFICATION_CONTENT_MULTILINE; static subscribeNotification(tag, subscriber, asyncCallback) { - Log.showInfo(TAG, `subscribeNotification from: ${tag}`)); + Log.showInfo(TAG, `subscribeNotification from: ${tag}`); Notification.subscribe(subscriber, asyncCallback); } static unsubscribeNotification(tag, subscriber) { - Log.showInfo(TAG, `subscribeNotification from: ${tag}`)); + Log.showInfo(TAG, `subscribeNotification from: ${tag}`); Notification.unsubscribe(subscriber); } static removeAll(tag, callback) { - Log.showInfo(TAG, `removeAll from: ${tag}`)); + Log.showInfo(TAG, `removeAll from: ${tag}`); Notification.removeAll(callback); } static remove(tag, hashCode, callback) { - Log.showInfo(TAG, `remove from: ${tag}`)); + Log.showInfo(TAG, `remove from: ${tag}`); Notification.remove(hashCode, callback) } static getAllActiveNotifications(tag, callback) { - Log.showInfo(TAG, `getAllActiveNotifications from: ${tag}`)); + Log.showInfo(TAG, `getAllActiveNotifications from: ${tag}`); Notification.getAllActiveNotifications(callback); } diff --git a/common/src/main/ets/default/commonEvent/CommonEventManager.ts b/common/src/main/ets/default/commonEvent/CommonEventManager.ts index 1f9b048..05affb7 100644 --- a/common/src/main/ets/default/commonEvent/CommonEventManager.ts +++ b/common/src/main/ets/default/commonEvent/CommonEventManager.ts @@ -16,7 +16,7 @@ import commonEvent from "@ohos.commonEvent"; import { CommonEventData } from "commonEvent/commonEventData"; import EventManager from "../event/EventManager"; -import Log from "../Log"; +import {Log} from "../Log"; import { SCREEN_CHANGE_EVENT } from "../ScreenLockManager"; export type CommonEventManager = { diff --git a/common/src/main/ets/default/commonEvent/index.ts b/common/src/main/ets/default/commonEvent/index.ts new file mode 100644 index 0000000..2c2ba88 --- /dev/null +++ b/common/src/main/ets/default/commonEvent/index.ts @@ -0,0 +1,6 @@ +export { CommonEventManager } from './CommonEventManager' + +export { getCommonEventManager } from './CommonEventManager' + +export { POLICY } from './CommonEventManager' + diff --git a/common/src/main/ets/default/event/EventBus.ts b/common/src/main/ets/default/event/EventBus.ts index 9195cc2..a031640 100644 --- a/common/src/main/ets/default/event/EventBus.ts +++ b/common/src/main/ets/default/event/EventBus.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Log from "../Log"; +import {Log} from "../Log"; export type Callback = (args: any) => void; const TAG = "EventBus"; diff --git a/common/src/main/ets/default/event/EventManager.ts b/common/src/main/ets/default/event/EventManager.ts index 9189075..e4db31a 100644 --- a/common/src/main/ets/default/event/EventManager.ts +++ b/common/src/main/ets/default/event/EventManager.ts @@ -14,8 +14,8 @@ */ import ServiceExtensionContext from "application/ServiceExtensionContext"; -import Log from "../Log"; -import createOrGet from "../SingleInstanceHelper"; +import {Log} from "../Log"; +import {createOrGet} from "../SingleInstanceHelper"; import { EventParser, START_ABILITY_EVENT, Event, LocalEvent } from "./EventUtil"; import { Callback, createEventBus, EventBus } from "./EventBus"; @@ -24,7 +24,7 @@ export type Events = string | string[]; const TAG = "EventManagerSc"; -class EventManager { +export class EventManager { mEventBus: EventBus; eventParser: EventParser; mContext: ServiceExtensionContext | undefined; diff --git a/common/src/main/ets/default/event/EventUtil.ts b/common/src/main/ets/default/event/EventUtil.ts index 33ba707..bc9c8db 100644 --- a/common/src/main/ets/default/event/EventUtil.ts +++ b/common/src/main/ets/default/event/EventUtil.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from "../Log"; +import {Log} from "../Log"; export type EventTarget = "local" | "remote" | "ability" | "commonEvent"; export type Event = { diff --git a/common/src/main/ets/default/event/index.ts b/common/src/main/ets/default/event/index.ts new file mode 100644 index 0000000..28136af --- /dev/null +++ b/common/src/main/ets/default/event/index.ts @@ -0,0 +1,7 @@ +export { EventManager } from './EventManager' + +export { unsubscribe } from './EventManager' + +export { obtainLocalEvent } from './EventUtil' + +export { obtainStartAbility } from './EventUtil' \ No newline at end of file diff --git a/common/src/main/ets/default/index.ts b/common/src/main/ets/default/index.ts new file mode 100644 index 0000000..0489d53 --- /dev/null +++ b/common/src/main/ets/default/index.ts @@ -0,0 +1,37 @@ +export { CheckEmptyUtils } from './CheckEmptyUtils' + +export { Constants } from './Constants' + +export { DateTimeCommon } from './DateTimeCommon' + +export { Log } from './Log' + +export { ReadConfigUtil } from './ReadConfigUtil' + +export { createOrGet } from './SingleInstanceHelper' + +export { StyleConfiguration } from './StyleConfiguration' + +export { StyleManager } from './StyleManager' + +export { SwitchUserManager } from './SwitchUserManager' + +export { WriteFaultLog } from './SysFaultLogger' + +export { SysFaultLogger } from './SysFaultLogger' + +export { Trace } from './Trace' + +export { TimeEventArgs } from './TimeManager' + +export { TIME_CHANGE_EVENT } from './TimeManager' + +export { TimeManager } from './TimeManager' + +export { WindowType } from './WindowManager' + +export { FaultID } from './SysFaultLogger' + +export { ScreenLockStatus } from './ScreenLockCommon' + +export { ReadConfigFile } from './ScreenLockCommon' \ No newline at end of file diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index bb53a3d..4136b01 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -5,5 +5,7 @@ "description": "example description", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../common" + } } \ No newline at end of file diff --git a/entry/src/main/ets/Application/AbilityStage.ts b/entry/src/main/ets/Application/AbilityStage.ts index 78dd564..4110d71 100644 --- a/entry/src/main/ets/Application/AbilityStage.ts +++ b/entry/src/main/ets/Application/AbilityStage.ts @@ -14,7 +14,7 @@ */ import AbilityStage from "@ohos.app.ability.AbilityStage"; -import Log from '../../../../../common/src/main/ets/default/Log'; +import {Log} from '../../../../../common/src/main/ets/default/Log'; const TAG = "Entry_AbilityStage"; diff --git a/entry/src/main/ets/MainAbility/MainAbility.ts b/entry/src/main/ets/MainAbility/MainAbility.ts index 087cfb4..981a945 100644 --- a/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/entry/src/main/ets/MainAbility/MainAbility.ts @@ -14,7 +14,7 @@ */ import Ability from '@ohos.app.ability.UIAbility' -import Log from '../../../../../common/src/main/ets/default/Log'; +import {Log} from '../../../../../common/src/main/ets/default/Log'; const TAG = "Entry_MainAbility"; diff --git a/features/batterycomponent/oh-package.json5 b/features/batterycomponent/oh-package.json5 index 578c17b..0f78e19 100644 --- a/features/batterycomponent/oh-package.json5 +++ b/features/batterycomponent/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/batterycomponent/src/main/ets/default/batteryModel.ts b/features/batterycomponent/src/main/ets/default/batteryModel.ts index b4d0dd3..2a5a69c 100644 --- a/features/batterycomponent/src/main/ets/default/batteryModel.ts +++ b/features/batterycomponent/src/main/ets/default/batteryModel.ts @@ -14,17 +14,17 @@ * limitations under the License. */ -import BatteryInfo from "@ohos.batteryInfo"; +import sBatteryInfo from "@ohos.batteryInfo"; import commonEvent from "@ohos.commonEvent"; -import createOrGet from "../../../../../../common/src/main/ets/default/SingleInstanceHelper"; +import {createOrGet} from '@ohos/common'; import Constants from "./common/constants"; -import Log from "../../../../../../common/src/main/ets/default/Log"; +import {Log} from '@ohos/common'; import { CommonEventData } from "commonEvent/commonEventData"; import { CommonEventManager, getCommonEventManager, - POLICY, -} from "../../../../../../common/src/main/ets/default/commonEvent/CommonEventManager"; + POLICY +} from '@ohos/common'; const TAG = "BatteryComponent-batteryModelSc"; const DEFAULT_PROGRESS = 100; diff --git a/features/batterycomponent/src/main/ets/default/common/StyleConfiguration.ts b/features/batterycomponent/src/main/ets/default/common/StyleConfiguration.ts index 1954fe0..0ae32f0 100644 --- a/features/batterycomponent/src/main/ets/default/common/StyleConfiguration.ts +++ b/features/batterycomponent/src/main/ets/default/common/StyleConfiguration.ts @@ -14,6 +14,7 @@ */ import StyleManager from '../../../../../../../common/src/main/ets/default/StyleManager'; +// import {StyleManager} from '@ohos/common' import Constants from './constants' const TAG = 'battery-StyleConfiguration'; diff --git a/features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets b/features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets index 3cd0d18..38d4d7d 100644 --- a/features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets +++ b/features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets @@ -17,8 +17,8 @@ import mBatteryModel from '../batteryModel'; import BatteryPic from './batteryPic' import BatterySoc from './batterySoc' import Constants from '../common/constants' -import Log from '../../../../../../../common/src/main/ets/default/Log' -import StyleConfigurationCommon from '../../../../../../../common/src/main/ets/default/StyleConfiguration' +import {Log} from '@ohos/common' +// import {StyleConfigurationCommon} from '../../../../../../../common/src/main/ets/default/StyleConfiguration' import StyleConfiguration from '../common/StyleConfiguration' import {StatusBarGroupComponentData } from '../../../../../../screenlock/src/main/ets/com/ohos/common/constants' diff --git a/features/batterycomponent/src/main/ets/default/pages/batteryPic.ets b/features/batterycomponent/src/main/ets/default/pages/batteryPic.ets index 6b2969b..8a26650 100644 --- a/features/batterycomponent/src/main/ets/default/pages/batteryPic.ets +++ b/features/batterycomponent/src/main/ets/default/pages/batteryPic.ets @@ -14,7 +14,7 @@ */ import Constants from '../common/constants' -import Log from '../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import StyleConfiguration from '../common/StyleConfiguration' const TAG = 'BatteryComponent-batteryPic' diff --git a/features/batterycomponent/src/main/ets/default/pages/batterySoc.ets b/features/batterycomponent/src/main/ets/default/pages/batterySoc.ets index 33c1272..23474e5 100644 --- a/features/batterycomponent/src/main/ets/default/pages/batterySoc.ets +++ b/features/batterycomponent/src/main/ets/default/pages/batterySoc.ets @@ -13,8 +13,8 @@ * limitations under the License. */ -import Log from '../../../../../../../common/src/main/ets/default/Log' -import StyleConfigurationCommon from '../../../../../../../common/src/main/ets/default/StyleConfiguration' +import {Log} from '@ohos/common'; +// import {StyleConfigurationCommon} from '../../../../../../../common/src/main/ets/default/StyleConfiguration' const TAG = 'BatteryComponent-batterySoc' diff --git a/features/clockcomponent/oh-package.json5 b/features/clockcomponent/oh-package.json5 index 4d43faa..d49adf4 100644 --- a/features/clockcomponent/oh-package.json5 +++ b/features/clockcomponent/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/clockcomponent/src/main/ets/default/app.ets b/features/clockcomponent/src/main/ets/default/app.ets index c23e876..d5e2608 100644 --- a/features/clockcomponent/src/main/ets/default/app.ets +++ b/features/clockcomponent/src/main/ets/default/app.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' const TAG = "Clock_Component_APP"; diff --git a/features/clockcomponent/src/main/ets/default/pages/clockIcon.ets b/features/clockcomponent/src/main/ets/default/pages/clockIcon.ets index ab67866..4c5c88c 100644 --- a/features/clockcomponent/src/main/ets/default/pages/clockIcon.ets +++ b/features/clockcomponent/src/main/ets/default/pages/clockIcon.ets @@ -13,16 +13,18 @@ * limitations under the License. */ -import Log from '../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import StyleConfiguration from '../common/StyleConfiguration' -import StyleConfigurationCommon from '../../../../../../../common/src/main/ets/default/StyleConfiguration' +// import {StyleConfigurationCommon} from '../../../../../../../common/src/main/ets/default/StyleConfiguration' import { StatusBarGroupComponentData } from '../../../../../../screenlock/src/main/ets/com/ohos/common/constants' import StatusBarVM from '../../../../../../screenlock/src/main/ets/com/ohos/vm/StatusBarVM' -import TimeManager, { +import TimeManager from '../../../../../../../common/src/main/ets/default/TimeManager' +import { TimeEventArgs, TIME_CHANGE_EVENT, -} from '../../../../../../../common/src/main/ets/default/TimeManager' -import EventManager, { unsubscribe } from '../../../../../../../common/src/main/ets/default/event/EventManager' +} from '@ohos/common' +import EventManager from '../../../../../../../common/src/main/ets/default/event/EventManager' +import {unsubscribe} from '@ohos/common' const TAG = 'ClockComponent-clockIcon'; diff --git a/features/datetimecomponent/oh-package.json5 b/features/datetimecomponent/oh-package.json5 index 29b1ee1..de60704 100644 --- a/features/datetimecomponent/oh-package.json5 +++ b/features/datetimecomponent/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/datetimecomponent/src/main/ets/com/ohos/view/component/dateTime.ets b/features/datetimecomponent/src/main/ets/com/ohos/view/component/dateTime.ets index f97b697..ce8a3f7 100644 --- a/features/datetimecomponent/src/main/ets/com/ohos/view/component/dateTime.ets +++ b/features/datetimecomponent/src/main/ets/com/ohos/view/component/dateTime.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import ViewModel from '../../vm/dateTimeViewModel' import Constants from '../../common/constants' -import { ScreenLockStatus } from '../../../../../../../../../common/src/main/ets/default/ScreenLockCommon' +// import { ScreenLockStatus } from '../../../../../../../../../common/src/main/ets/default/ScreenLockCommon' import deviceInfo from '@ohos.deviceInfo'; import i18n from '@ohos.i18n'; diff --git a/features/datetimecomponent/src/main/ets/com/ohos/vm/dateTimeViewModel.ts b/features/datetimecomponent/src/main/ets/com/ohos/vm/dateTimeViewModel.ts index e013bc8..74fe15a 100644 --- a/features/datetimecomponent/src/main/ets/com/ohos/vm/dateTimeViewModel.ts +++ b/features/datetimecomponent/src/main/ets/com/ohos/vm/dateTimeViewModel.ts @@ -15,11 +15,12 @@ import featureAbility from '@ohos.ability.featureAbility' import commonEvent from '@ohos.commonEvent'; -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import DateTimeCommon from '../../../../../../../../common/src/main/ets/default/DateTimeCommon' -import sTimeManager, {TimeEventArgs, TIME_CHANGE_EVENT, -} from '../../../../../../../../common/src/main/ets/default/TimeManager'; -import EventManager, {unsubscribe} from '../../../../../../../../common/src/main/ets/default/event/EventManager' +import sTimeManager from '../../../../../../../../common/src/main/ets/default/TimeManager'; +import {TimeEventArgs, TIME_CHANGE_EVENT} from '@ohos/common' +import EventManager from '../../../../../../../../common/src/main/ets/default/event/EventManager' +import {unsubscribe} from '@ohos/common' const TAG = 'ScreenLock-DateTimeViewModel' diff --git a/features/noticeitem/oh-package.json5 b/features/noticeitem/oh-package.json5 index 2a1c741..231d18f 100644 --- a/features/noticeitem/oh-package.json5 +++ b/features/noticeitem/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/common/CommonUtil.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/common/CommonUtil.ts index be6255b..4e4e9c8 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/common/CommonUtil.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/common/CommonUtil.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import WantAgent from '@ohos.wantAgent'; const TAG = 'CommonUtil'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/common/ScrollbarManager.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/common/ScrollbarManager.ts index eb2b491..8c653a0 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/common/ScrollbarManager.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/common/ScrollbarManager.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' const TAG = 'ScrollbarManager'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationConfig.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationConfig.ts index 3ef0704..b65f93b 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationConfig.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationConfig.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import ReadConfigUtil from '../../../../../../../../../common/src/main/ets/default/ReadConfigUtil'; -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {ReadConfigUtil} from '@ohos/common' +import {Log} from '@ohos/common' const TAG = 'NotificationConfig' diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationDistributionManager.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationDistributionManager.ts index ce78fdf..23459f8 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationDistributionManager.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationDistributionManager.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import DeviceManager from '@ohos.distributedDeviceManager'; import DeviceInfo from '@ohos.deviceInfo'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationManager.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationManager.ts index 1c2feb6..d7d07f5 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationManager.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationManager.ts @@ -17,7 +17,7 @@ import Notification from '@ohos.notification'; import PluginComponentManager from '@ohos.pluginComponent'; import Systemparameter from '@ohos.systemparameter'; -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' const TAG = 'NotificationManager'; // Temporary path diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationService.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationService.ts index 408a941..ab4650f 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationService.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationService.ts @@ -13,12 +13,12 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import NotificationManager from './NotificationManager'; import ParseDataUtil from './ParseDataUtil'; import RuleController from './rule/RuleController'; import CommonUtil from '../common/CommonUtil'; -import createOrGet from "../../../../../../../../../common/src/main/ets/default/SingleInstanceHelper"; +import {createOrGet} from '@ohos/common' import DistributionManager from './NotificationDistributionManager'; const TAG = 'NotificationServiceSc'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationWindowManager.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationWindowManager.ts index 48b94f0..d9b9712 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationWindowManager.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationWindowManager.ts @@ -13,9 +13,9 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import EventManager from "../../../../../../../../../common/src/main/ets/default/event/EventManager"; -import {obtainLocalEvent} from "../../../../../../../../../common/src/main/ets/default/event/EventUtil"; +import {obtainLocalEvent} from '@ohos/common' const TAG = `NotificationWindowManager`; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/ParseDataUtil.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/ParseDataUtil.ts index 6ed502b..3fb6c5d 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/ParseDataUtil.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/ParseDataUtil.ts @@ -14,9 +14,9 @@ */ import AccountManager from '@ohos.account.osAccount'; -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; -import BundleManager from '../../../../../../../../../common/src/main/ets/default/abilitymanager/bundleManager'; -import AbilityManager from '../../../../../../../../../common/src/main/ets/default/abilitymanager/abilityManager'; +import {Log} from '@ohos/common' +import {BundleManager} from '@ohos/common' +import {AbilityManager} from '@ohos/common' import NotificationManager from './NotificationManager'; import {NotificationItemData} from '../common/constants'; import {NotificationConfig} from './NotificationConfig'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/rule/RuleController.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/rule/RuleController.ts index 6e9cefe..a0a3f32 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/rule/RuleController.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/rule/RuleController.ts @@ -15,10 +15,10 @@ */ import {NotificationItemData} from '../../common/constants'; -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import {SlotLevel} from '@ohos.notification'; import Notification from '@ohos.notification'; -import CheckEmptyUtils from '../../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils'; +import {CheckEmptyUtils} from '@ohos/common'; import Bundle from '@ohos.bundle'; const TAG = 'NotificationRuleController'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/NotificationListComponent.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/NotificationListComponent.ets index d07b180..12ad19b 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/NotificationListComponent.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/NotificationListComponent.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import Constants, {NotificationLayout as Layout} from '../common/constants'; import NotificationItem from './item/notificationItem' import GroupNotificationItem from './item/groupItem' diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/actionComponent.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/actionComponent.ets index 5d10a8f..5299ed5 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/actionComponent.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/actionComponent.ets @@ -13,8 +13,8 @@ * limitations under the License. */ -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; -import CheckEmptyUtils from '../../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils'; +import {Log} from '@ohos/common' +import {CheckEmptyUtils} from '@ohos/common' import ViewModel from '../../viewmodel/ViewModel'; import Constants, {InputActionButtonData, NotificationLayout as Layout} from '../../common/constants'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/bannerNotificationItem.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/bannerNotificationItem.ets index d9f6c86..0cedb77 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/bannerNotificationItem.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/bannerNotificationItem.ets @@ -13,9 +13,10 @@ * limitations under the License. */ -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; -import AbilityManager from '../../../../../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' -import WindowManager, { WindowType } from '../../../../../../../../../../common/src/main/ets/default/WindowManager' +import {Log} from '@ohos/common' +import {AbilityManager} from '@ohos/common' +import WindowManager from '../../../../../../../../../../common/src/main/ets/default/WindowManager' +import { WindowType } from '@ohos/common' import Constants, {NotificationLayout as Layout} from '../../common/constants'; import ViewModel from '../../viewmodel/ViewModel'; import CustomItem from './customItem'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/confirmDialog.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/confirmDialog.ets index e145a9c..1009412 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/confirmDialog.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/confirmDialog.ets @@ -14,7 +14,7 @@ */ import Constants from '../../common/constants'; -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' const TAG = 'NoticeItem-Confirm'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/customItem.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/customItem.ets index 828684d..921d82c 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/customItem.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/customItem.ets @@ -14,7 +14,7 @@ */ -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import ViewModel from '../../viewmodel/ViewModel'; import NotificationManager from '../../model/NotificationManager'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/devicesDialog.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/devicesDialog.ets index 00611e0..a101594 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/devicesDialog.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/devicesDialog.ets @@ -14,7 +14,7 @@ */ import Constants from '../../common/constants'; -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import DistributionManager from '../../model/NotificationDistributionManager'; const TAG = 'NoticeItem-DevicesDialog'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/generalItem.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/generalItem.ets index 90188bc..84ac557 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/generalItem.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/generalItem.ets @@ -19,8 +19,8 @@ import longItem from './longItem'; import multiItem from './multiItem'; import pictureItem from './pictureItem'; import titleItem from './titleItem'; -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; -import CheckEmptyUtils from '../../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils'; +import {Log} from '@ohos/common' +import {CheckEmptyUtils} from '@ohos/common' import ViewModel from '../../viewmodel/ViewModel'; import ActionComponent from './actionComponent'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/groupItem.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/groupItem.ets index 964c336..ebd1bde 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/groupItem.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/groupItem.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import Constants, {NotificationLayout as Layout} from '../../common/constants'; import NotificationItem from './notificationItem' import titleItem from './titleItem'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/iconListComponent.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/iconListComponent.ets index 179cf1b..f550766 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/iconListComponent.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/iconListComponent.ets @@ -14,7 +14,7 @@ */ import Constants, {NotificationLayout as Layout} from '../../common/constants'; -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import SettingDialog from './settingDialog'; import ConfirmDialog from './confirmDialog' import ViewModel from '../../viewmodel/ViewModel'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/notificationItem.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/notificationItem.ets index d635af6..f0c015a 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/notificationItem.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/notificationItem.ets @@ -16,7 +16,7 @@ import Constants, {NotificationLayout as Layout} from '../../common/constants'; import GeneralItem from './generalItem'; import CustomItem from './customItem'; -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import ViewModel from '../../viewmodel/ViewModel'; import DevicesDialog from './devicesDialog'; import WantAgent from '@ohos.wantAgent'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/pictureItem.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/pictureItem.ets index 3c03381..d763de9 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/pictureItem.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/pictureItem.ets @@ -14,7 +14,7 @@ */ import Constants, {NotificationItemData, NotificationLayout as Layout} from '../../common/constants'; -import CheckEmptyUtils from '../../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils'; +import {CheckEmptyUtils} from '@ohos/common' @Component export default struct PictureItem { diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/settingDialog.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/settingDialog.ets index 6a8b1f1..5c9382c 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/settingDialog.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/settingDialog.ets @@ -14,10 +14,10 @@ */ import Constants,{NotificationItemData} from '../../common/constants'; -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; -import CheckEmptyUtils from '../../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils'; +import {Log} from '@ohos/common' +import {CheckEmptyUtils} from '@ohos/common' import EventManager from "../../../../../../../../../../common/src/main/ets/default/event/EventManager" -import {obtainStartAbility} from "../../../../../../../../../../common/src/main/ets/default/event/EventUtil" +import {obtainStartAbility} from '@ohos/common' import Notification from '@ohos.notification'; const TAG = 'NoticeItem-Setting'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/titleItem.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/titleItem.ets index e592776..a124eee 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/titleItem.ets +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/titleItem.ets @@ -14,8 +14,8 @@ */ import Constants, {NotificationLayout as Layout} from '../../common/constants'; -import Log from '../../../../../../../../../../common/src/main/ets/default/Log'; -import CheckEmptyUtils from '../../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils'; +import {Log} from '@ohos/common' +import {CheckEmptyUtils} from '@ohos/common' const TAG = 'NoticeItem-TitleItem'; diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/viewmodel/ViewModel.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/viewmodel/ViewModel.ts index 81e280e..a767d36 100644 --- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/viewmodel/ViewModel.ts +++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/viewmodel/ViewModel.ts @@ -14,17 +14,17 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; -import SwitchUserManager from '../../../../../../../../../common/src/main/ets/default/SwitchUserManager'; +import {Log} from '@ohos/common' +import {SwitchUserManager} from '@ohos/common' import media from '@ohos.multimedia.media'; import SourceType from '@ohos.notification' import NotificationService from '../model/NotificationService' import NotificationWindowManager from '../model/NotificationWindowManager'; import NotificationConfig from '../model/NotificationConfig'; -import CheckEmptyUtils from '../../../../../../../../../common/src/main/ets/default/CheckEmptyUtils'; -import AbilityManager from "../../../../../../../../../common/src/main/ets/default/abilitymanager/abilityManager" +import {CheckEmptyUtils} from '@ohos/common' +import {AbilityManager} from '@ohos/common' import EventManager from "../../../../../../../../../common/src/main/ets/default/event/EventManager" -import {obtainLocalEvent} from "../../../../../../../../../common/src/main/ets/default/event/EventUtil" +import {obtainLocalEvent} from '@ohos/common' import CommonUtil from '../common/CommonUtil'; import Constants from '../common/constants'; diff --git a/features/screenlock/oh-package.json5 b/features/screenlock/oh-package.json5 index 5787c62..16ab2b4 100644 --- a/features/screenlock/oh-package.json5 +++ b/features/screenlock/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/screenlock/src/main/ets/com/ohos/model/accountsModel.ts b/features/screenlock/src/main/ets/com/ohos/model/accountsModel.ts index 26e64ee..02f1fd2 100644 --- a/features/screenlock/src/main/ets/com/ohos/model/accountsModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/model/accountsModel.ts @@ -18,12 +18,12 @@ import osAccount from '@ohos.account.osAccount' import commonEvent from '@ohos.commonEvent'; import util from '@ohos.util'; import {Callback} from '@ohos.base'; -import Trace from '../../../../../../../../common/src/main/ets/default/Trace'; -import {SysFaultLogger, FaultID} from '../../../../../../../../common/src/main/ets/default/SysFaultLogger'; -import Log from '../../../../../../../../common/src/main/ets/default/Log'; -import { CommonEventManager, getCommonEventManager } from "../../../../../../../../common/src/main/ets/default/commonEvent/CommonEventManager"; +import {Trace} from '@ohos/common' +import {SysFaultLogger, FaultID} from '@ohos/common' +import {Log} from '@ohos/common' +import { CommonEventManager, getCommonEventManager } from '@ohos/common' import EventManager from "../../../../../../../../common/src/main/ets/default/event/EventManager"; -import { obtainLocalEvent } from "../../../../../../../../common/src/main/ets/default/event/EventUtil"; +import {obtainLocalEvent} from '@ohos/common' import {UserData} from '../data/userData'; const TAG = "ScreenLock-AccountsModel" diff --git a/features/screenlock/src/main/ets/com/ohos/model/screenLockModel.ts b/features/screenlock/src/main/ets/com/ohos/model/screenLockModel.ts index 97e19c0..38b85af 100644 --- a/features/screenlock/src/main/ets/com/ohos/model/screenLockModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/model/screenLockModel.ts @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Trace from '../../../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../../../common/src/main/ets/default/Log' -import {SysFaultLogger, FaultID} from '../../../../../../../../common/src/main/ets/default/SysFaultLogger' +import {Trace} from '@ohos/common' +import {Log} from '@ohos/common' +import {SysFaultLogger, FaultID} from '@ohos/common' import ScreenLockMar from '@ohos.screenLock'; import windowManager from '@ohos.window' import Constants from '../common/constants' diff --git a/features/screenlock/src/main/ets/com/ohos/model/screenLockService.ts b/features/screenlock/src/main/ets/com/ohos/model/screenLockService.ts index 544d674..666cc3e 100644 --- a/features/screenlock/src/main/ets/com/ohos/model/screenLockService.ts +++ b/features/screenlock/src/main/ets/com/ohos/model/screenLockService.ts @@ -12,13 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log'; -import Trace from '../../../../../../../../common/src/main/ets/default/Trace' -import {WriteFaultLog, FaultID} from '../../../../../../../../common/src/main/ets/default/SysFaultLogger' +import {Log} from '@ohos/common' +import {Trace} from '@ohos/common' +import {WriteFaultLog, FaultID} from '@ohos/common' import ScreenLockModel from './screenLockModel'; import AccountModel, {AuthType, AuthSubType, AuthTurstLevel} from './accountsModel' import {ScreenLockStatus} from '../../../../../../../../common/src/main/ets/default/ScreenLockCommon'; -import createOrGet from '../../../../../../../../common/src/main/ets/default/SingleInstanceHelper' +import {createOrGet} from '@ohos/common' import Router from '@system.router'; import commonEvent from '@ohos.commonEvent'; import hiDebug from '@ohos.hidebug'; diff --git a/features/screenlock/src/main/ets/com/ohos/model/screenlockStyle.ts b/features/screenlock/src/main/ets/com/ohos/model/screenlockStyle.ts index 4c8c1da..da0e2e8 100644 --- a/features/screenlock/src/main/ets/com/ohos/model/screenlockStyle.ts +++ b/features/screenlock/src/main/ets/com/ohos/model/screenlockStyle.ts @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import {ReadConfigFile} from '../../../../../../../../common/src/main/ets/default/ScreenLockCommon' const SCREENLOCK_MODE_FILE_NAME = "screenlock.json"; diff --git a/features/screenlock/src/main/ets/com/ohos/view/component/accounts.ets b/features/screenlock/src/main/ets/com/ohos/view/component/accounts.ets index 36e83a5..4c1c56d 100644 --- a/features/screenlock/src/main/ets/com/ohos/view/component/accounts.ets +++ b/features/screenlock/src/main/ets/com/ohos/view/component/accounts.ets @@ -13,12 +13,13 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import ViewModel from '../../vm/accountsViewModel'; import Constants from '../../common/constants'; import {UserData} from '../../data/userData'; import { ACCOUNTS_REFRESH_EVENT } from '../../model/accountsModel' -import EventManager, { unsubscribe } from '../../../../../../../../../common/src/main/ets/default/event/EventManager'; +import EventManager from '../../../../../../../../../common/src/main/ets/default/event/EventManager'; +import {unsubscribe} from '@ohos/common' const TAG = 'ScreenLock-Accounts' diff --git a/features/screenlock/src/main/ets/com/ohos/view/component/batterySoc.ets b/features/screenlock/src/main/ets/com/ohos/view/component/batterySoc.ets index fcd432f..c571dee 100644 --- a/features/screenlock/src/main/ets/com/ohos/view/component/batterySoc.ets +++ b/features/screenlock/src/main/ets/com/ohos/view/component/batterySoc.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../../common/constants' const TAG = 'ScreenLock-BatterySoc' diff --git a/features/screenlock/src/main/ets/com/ohos/view/component/customPSD.ets b/features/screenlock/src/main/ets/com/ohos/view/component/customPSD.ets index 00b96b8..4f7b5f4 100644 --- a/features/screenlock/src/main/ets/com/ohos/view/component/customPSD.ets +++ b/features/screenlock/src/main/ets/com/ohos/view/component/customPSD.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../../common/constants' import NumkeyBoard from './numkeyBoard' import ViewModel from '../../vm/customPSDViewModel' diff --git a/features/screenlock/src/main/ets/com/ohos/view/component/digitalPSD.ets b/features/screenlock/src/main/ets/com/ohos/view/component/digitalPSD.ets index 3249787..191abdf 100644 --- a/features/screenlock/src/main/ets/com/ohos/view/component/digitalPSD.ets +++ b/features/screenlock/src/main/ets/com/ohos/view/component/digitalPSD.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../../common/constants' import NumkeyBoard from './numkeyBoard' import ViewModel from '../../vm/digitalPSDViewModel' diff --git a/features/screenlock/src/main/ets/com/ohos/view/component/lockIcon.ets b/features/screenlock/src/main/ets/com/ohos/view/component/lockIcon.ets index a27bdd9..ea398be 100644 --- a/features/screenlock/src/main/ets/com/ohos/view/component/lockIcon.ets +++ b/features/screenlock/src/main/ets/com/ohos/view/component/lockIcon.ets @@ -13,8 +13,8 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' -import {ScreenLockStatus} from '../../../../../../../../../common/src/main/ets/default/ScreenLockCommon' +import {Log} from '@ohos/common' +import {ScreenLockStatus} from '@ohos/common' import ViewModel from '../../vm/lockIconViewModel' import Constants from '../../common/constants' diff --git a/features/screenlock/src/main/ets/com/ohos/view/component/mixedPSD.ets b/features/screenlock/src/main/ets/com/ohos/view/component/mixedPSD.ets index 883f18b..ab55b2d 100644 --- a/features/screenlock/src/main/ets/com/ohos/view/component/mixedPSD.ets +++ b/features/screenlock/src/main/ets/com/ohos/view/component/mixedPSD.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../../common/constants' import ViewModel from '../../vm/mixedPSDViewModel' import deviceInfo from '@ohos.deviceInfo'; diff --git a/features/screenlock/src/main/ets/com/ohos/view/component/numkeyBoard.ets b/features/screenlock/src/main/ets/com/ohos/view/component/numkeyBoard.ets index d76375b..358f182 100644 --- a/features/screenlock/src/main/ets/com/ohos/view/component/numkeyBoard.ets +++ b/features/screenlock/src/main/ets/com/ohos/view/component/numkeyBoard.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../../common/constants' import BaseViewModel from '../../vm/baseViewModel' import deviceInfo from '@ohos.deviceInfo'; diff --git a/features/screenlock/src/main/ets/com/ohos/view/component/statusBar.ets b/features/screenlock/src/main/ets/com/ohos/view/component/statusBar.ets index 128bab7..eebef1b 100644 --- a/features/screenlock/src/main/ets/com/ohos/view/component/statusBar.ets +++ b/features/screenlock/src/main/ets/com/ohos/view/component/statusBar.ets @@ -13,12 +13,12 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import ViewModel from '../../vm/StatusBarVM' import Constants from '../../common/constants' -import BatteryIcon from '../../../../../../../../../features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets' -import ClockIcon from '../../../../../../../../../features/clockcomponent/src/main/ets/default/pages/clockIcon.ets' -import WifiIcon from '../../../../../../../../../features/wificomponent/src/main/ets/default/pages/wifiIcon.ets' +import BatteryIcon from '../../../../../../../../../features/batterycomponent/src/main/ets/default/pages/batteryIcon' +import ClockIcon from '../../../../../../../../../features/clockcomponent/src/main/ets/default/pages/clockIcon' +import WifiIcon from '../../../../../../../../../features/wificomponent/src/main/ets/default/pages/wifiIcon' import SignalIcon from '../../../../../../../../../features/signalcomponent/src/main/ets/default/pages/signalIcon' import deviceInfo from '@ohos.deviceInfo'; diff --git a/features/screenlock/src/main/ets/com/ohos/vm/StatusBarVM.ts b/features/screenlock/src/main/ets/com/ohos/vm/StatusBarVM.ts index 4cc5cce..590da36 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/StatusBarVM.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/StatusBarVM.ts @@ -13,8 +13,9 @@ * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log'; -import WindowManager, { WindowType } from '../../../../../../../../common/src/main/ets/default/WindowManager'; +import {Log} from '@ohos/common' +import WindowManager from '../../../../../../../../common/src/main/ets/default/WindowManager'; +import { WindowType } from '@ohos/common' import Constants, {StatusBarGroupComponentData} from '../common/constants'; const TAG = 'StatusBarVM'; diff --git a/features/screenlock/src/main/ets/com/ohos/vm/accountsViewModel.ts b/features/screenlock/src/main/ets/com/ohos/vm/accountsViewModel.ts index 6718d2a..820b09a 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/accountsViewModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/accountsViewModel.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import ScreenLockService from '../model/screenLockService' const TAG = "ScreenLock-AccountsViewModel" diff --git a/features/screenlock/src/main/ets/com/ohos/vm/baseViewModel.ts b/features/screenlock/src/main/ets/com/ohos/vm/baseViewModel.ts index d42fd5f..2cd5d15 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/baseViewModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/baseViewModel.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../common/constants' import service, {UnlockResult, AuthType, AuthSubType} from '../model/screenLockService' import {Callback} from '@ohos.base'; diff --git a/features/screenlock/src/main/ets/com/ohos/vm/batterySocViewModel.ets b/features/screenlock/src/main/ets/com/ohos/vm/batterySocViewModel.ets index 8c8ca34..8772db6 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/batterySocViewModel.ets +++ b/features/screenlock/src/main/ets/com/ohos/vm/batterySocViewModel.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' const TAG = 'ScreenLock-BatterySocViewModel' diff --git a/features/screenlock/src/main/ets/com/ohos/vm/customPSDViewModel.ts b/features/screenlock/src/main/ets/com/ohos/vm/customPSDViewModel.ts index 4655c77..e9252f8 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/customPSDViewModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/customPSDViewModel.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import Trace from '../../../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Trace} from '@ohos/common' +import {Log} from '@ohos/common' import Constants from '../common/constants' import BaseViewModel, {service, AuthType, AuthSubType} from './baseViewModel' import {Callback} from '@ohos.base'; diff --git a/features/screenlock/src/main/ets/com/ohos/vm/digitalPSDViewModel.ts b/features/screenlock/src/main/ets/com/ohos/vm/digitalPSDViewModel.ts index 1b76247..7f201db 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/digitalPSDViewModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/digitalPSDViewModel.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log' -import Trace from '../../../../../../../../common/src/main/ets/default/Trace' +import {Log} from '@ohos/common' +import {Trace} from '@ohos/common' import Constants from '../common/constants' import BaseViewModel, {service, AuthType, AuthSubType} from './baseViewModel' import {Callback} from '@ohos.base'; diff --git a/features/screenlock/src/main/ets/com/ohos/vm/lockIconViewModel.ts b/features/screenlock/src/main/ets/com/ohos/vm/lockIconViewModel.ts index 4ac29aa..d32ea6c 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/lockIconViewModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/lockIconViewModel.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log' -import {ScreenLockStatus} from '../../../../../../../../common/src/main/ets/default/ScreenLockCommon' +import {Log} from '@ohos/common' +import {ScreenLockStatus} from '@ohos/common' import screenLockService from '../model/screenLockService' const TAG = 'ScreenLock-LockIconViewModel' diff --git a/features/screenlock/src/main/ets/com/ohos/vm/mixedPSDViewModel.ts b/features/screenlock/src/main/ets/com/ohos/vm/mixedPSDViewModel.ts index d502cab..9df2aee 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/mixedPSDViewModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/mixedPSDViewModel.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import Trace from '../../../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Trace} from '@ohos/common' +import {Log} from '@ohos/common' import BaseViewModel, {service, AuthType, AuthSubType} from './baseViewModel' import {Callback} from '@ohos.base'; diff --git a/features/shortcutcomponent/oh-package.json5 b/features/shortcutcomponent/oh-package.json5 index 4dde6b5..808522b 100644 --- a/features/shortcutcomponent/oh-package.json5 +++ b/features/shortcutcomponent/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/shortcutcomponent/src/main/ets/com/ohos/view/component/shortcut.ets b/features/shortcutcomponent/src/main/ets/com/ohos/view/component/shortcut.ets index 933da1e..303dcaf 100644 --- a/features/shortcutcomponent/src/main/ets/com/ohos/view/component/shortcut.ets +++ b/features/shortcutcomponent/src/main/ets/com/ohos/view/component/shortcut.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../../common/constants' import ViewModel from '../../vm/shortcutViewModel' import power from '@ohos.power' diff --git a/features/shortcutcomponent/src/main/ets/com/ohos/vm/shortcutViewModel.ts b/features/shortcutcomponent/src/main/ets/com/ohos/vm/shortcutViewModel.ts index cc897a5..fb0ba7e 100644 --- a/features/shortcutcomponent/src/main/ets/com/ohos/vm/shortcutViewModel.ts +++ b/features/shortcutcomponent/src/main/ets/com/ohos/vm/shortcutViewModel.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../common/constants' import power from '@ohos.power' diff --git a/features/signalcomponent/oh-package.json5 b/features/signalcomponent/oh-package.json5 index 376cc01..01e0bd4 100644 --- a/features/signalcomponent/oh-package.json5 +++ b/features/signalcomponent/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/signalcomponent/src/main/ets/default/app.ets b/features/signalcomponent/src/main/ets/default/app.ets index e87d720..b509c03 100644 --- a/features/signalcomponent/src/main/ets/default/app.ets +++ b/features/signalcomponent/src/main/ets/default/app.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' const TAG = "Signal_Component_APP"; diff --git a/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets b/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets index cd983f6..986fe03 100644 --- a/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets +++ b/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets @@ -15,8 +15,8 @@ import Constants from '../common/constants'; import mSignalModel from '../signalModel'; -import Log from '../../../../../../../common/src/main/ets/default/Log' -import StyleConfigurationCommon from '../../../../../../../common/src/main/ets/default/StyleConfiguration' +import {Log} from '@ohos/common' +// import {StyleConfigurationCommon} from '../../../../../../../common/src/main/ets/default/StyleConfiguration' import StyleConfiguration from '../common/StyleConfiguration' import { StatusBarGroupComponentData } from '../../../../../../screenlock/src/main/ets/com/ohos/common/constants' diff --git a/features/signalcomponent/src/main/ets/default/signalModel.ts b/features/signalcomponent/src/main/ets/default/signalModel.ts index 188cd77..b9290c2 100644 --- a/features/signalcomponent/src/main/ets/default/signalModel.ts +++ b/features/signalcomponent/src/main/ets/default/signalModel.ts @@ -17,7 +17,7 @@ import commonEvent from "@ohos.commonEvent"; import Radio from '@ohos.telephony.radio'; import Sim from '@ohos.telephony.sim'; import Observer from '@ohos.telephony.observer'; -import Log from "../../../../../../common/src/main/ets/default/Log"; +import { Log } from '@ohos/common' import Constants from './common/constants'; const TAG = 'SignalStatus-SignalModel'; diff --git a/features/wallpapercomponent/oh-package.json5 b/features/wallpapercomponent/oh-package.json5 index dce4893..f6b0495 100644 --- a/features/wallpapercomponent/oh-package.json5 +++ b/features/wallpapercomponent/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/wallpapercomponent/src/main/ets/com/ohos/view/component/wallpaper.ets b/features/wallpapercomponent/src/main/ets/com/ohos/view/component/wallpaper.ets index 36cb18b..1037b38 100644 --- a/features/wallpapercomponent/src/main/ets/com/ohos/view/component/wallpaper.ets +++ b/features/wallpapercomponent/src/main/ets/com/ohos/view/component/wallpaper.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Log from '../../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import ViewModel from '../../vm/wallpaperViewModel' import Constants from '../../common/constants' -import Trace from '../../../../../../../../../common/src/main/ets/default/Trace' +import {Trace} from '@ohos/common' const TAG = 'ScreenLock-Wallpaper' diff --git a/features/wallpapercomponent/src/main/ets/com/ohos/vm/wallpaperViewModel.ts b/features/wallpapercomponent/src/main/ets/com/ohos/vm/wallpaperViewModel.ts index 3d2608e..0f786d1 100644 --- a/features/wallpapercomponent/src/main/ets/com/ohos/vm/wallpaperViewModel.ts +++ b/features/wallpapercomponent/src/main/ets/com/ohos/vm/wallpaperViewModel.ts @@ -15,7 +15,7 @@ import image from '@ohos.multimedia.image'; import WallpaperMar from '@ohos.wallpaper' -import Log from '../../../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' const TAG = 'ScreenLock-WallpaperViewModel' diff --git a/features/wificomponent/oh-package.json5 b/features/wificomponent/oh-package.json5 index 391d823..2d7fb19 100644 --- a/features/wificomponent/oh-package.json5 +++ b/features/wificomponent/oh-package.json5 @@ -7,5 +7,7 @@ "main": "index.ets", "repository": {}, "version": "1.0.0", - "dependencies": {} + "dependencies": { + "@ohos/common": "../../common" + } } \ No newline at end of file diff --git a/features/wificomponent/src/main/ets/default/app.ets b/features/wificomponent/src/main/ets/default/app.ets index dfd326f..a4b5f59 100644 --- a/features/wificomponent/src/main/ets/default/app.ets +++ b/features/wificomponent/src/main/ets/default/app.ets @@ -13,8 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; - +import {Log} from '@ohos/common' const TAG = "Wifi_Component_App"; export default { diff --git a/features/wificomponent/src/main/ets/default/pages/wifiIcon.ets b/features/wificomponent/src/main/ets/default/pages/wifiIcon.ets index 4513b63..ced468e 100644 --- a/features/wificomponent/src/main/ets/default/pages/wifiIcon.ets +++ b/features/wificomponent/src/main/ets/default/pages/wifiIcon.ets @@ -15,8 +15,8 @@ import Constants from '../common/constants' import mWifiModel from '../wifiModel' -import Log from '../../../../../../../common/src/main/ets/default/Log' -import StyleConfigurationCommon from '../../../../../../../common/src/main/ets/default/StyleConfiguration' +import {Log} from '@ohos/common' +// import {StyleConfigurationCommon} from '../../../../../../../common/src/main/ets/default/StyleConfiguration' import StyleConfiguration from '../common/StyleConfiguration' import {StatusBarGroupComponentData } from '../../../../../../screenlock/src/main/ets/com/ohos/common/constants' diff --git a/features/wificomponent/src/main/ets/default/wifiModel.ts b/features/wificomponent/src/main/ets/default/wifiModel.ts index ef772ee..c025c9a 100644 --- a/features/wificomponent/src/main/ets/default/wifiModel.ts +++ b/features/wificomponent/src/main/ets/default/wifiModel.ts @@ -15,7 +15,7 @@ import wifi from '@ohos.wifi'; import Constants, {WifiState, WifiConnectionState} from './common/constants' -import Log from "../../../../../../common/src/main/ets/default/Log"; +import {Log} from '@ohos/common' const TAG = 'WifiComponent-WifiModel'; diff --git a/product/pc/src/main/ets/Application/AbilityStage.ts b/product/pc/src/main/ets/Application/AbilityStage.ts index a68556f..3b51a28 100644 --- a/product/pc/src/main/ets/Application/AbilityStage.ts +++ b/product/pc/src/main/ets/Application/AbilityStage.ts @@ -14,7 +14,7 @@ */ import AbilityStage from "@ohos.app.ability.AbilityStage" -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '../../../../../../common/src/main/ets/default/Log' const TAG = "ScreenLock-MainAbilityStage" diff --git a/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts b/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts index 844a0e3..f39d0c8 100644 --- a/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts +++ b/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts @@ -17,9 +17,9 @@ import ServiceExtension from '@ohos.app.ability.ServiceExtensionAbility' import windowManager from '@ohos.window' import WindowManagers, { WindowType } from "../../../../../../common/src/main/ets/default/WindowManager"; import display from '@ohos.display' -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '../../../../../../common/src/main/ets/default/Log' import Constants from '../../../../../../features/screenlock/src/main/ets/com/ohos/common/constants' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' import sTimeManager from '../../../../../../common/src/main/ets/default/TimeManager' import inputMethod from '@ohos.inputMethod' diff --git a/product/pc/src/main/ets/common/StyleConfiguration.ts b/product/pc/src/main/ets/common/StyleConfiguration.ts index 3fa9a07..62d14d9 100644 --- a/product/pc/src/main/ets/common/StyleConfiguration.ts +++ b/product/pc/src/main/ets/common/StyleConfiguration.ts @@ -14,7 +14,7 @@ */ import StyleManager from '../../../../../../common/src/main/ets/default/StyleManager'; -import Log from '../../../../../../common/src/main/ets/default/Log'; +import {Log} from '../../../../../../common/src/main/ets/default/Log'; const TAG = 'Lock_StatusBar-StyleConfiguration'; diff --git a/product/pc/src/main/ets/common/StyleManager.ts b/product/pc/src/main/ets/common/StyleManager.ts index 6f3052d..797b868 100644 --- a/product/pc/src/main/ets/common/StyleManager.ts +++ b/product/pc/src/main/ets/common/StyleManager.ts @@ -13,9 +13,9 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager'; -import CommonStyleConfiguration from '../../../../../../common/src/main/ets/default/StyleConfiguration'; +import {Log} from '../../../../../../common/src/main/ets/default/Log'; +import {AbilityManager} from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager'; +import {StyleConfiguration} from '../../../../../../common/src/main/ets/default/StyleConfiguration'; import BatteryStyleConfiguration from '../../../../../../features/batterycomponent/src/main/ets/default/common/StyleConfiguration' import WifiStyleConfiguration from '../../../../../../features/wificomponent/src/main/ets/default/common/StyleConfiguration' import SignalStyleConfiguration from '../../../../../../features/signalcomponent/src/main/ets/default/common/StyleConfiguration' @@ -40,7 +40,7 @@ export default class StyleManager { // Common { - let style: any = CommonStyleConfiguration.getCommonStyle(); + let style: any = StyleConfiguration.getCommonStyle(); style.statusBarFontSize = StyleManager.calcScaleSizePx(14); style.statusBarMarginLeftRight = StyleManager.calcScaleSizePx(10); Log.showDebug(TAG, `setStyle ${JSON.stringify(style.statusBarFontSize)}, diff --git a/product/pc/src/main/ets/pages/customPassword.ets b/product/pc/src/main/ets/pages/customPassword.ets index db82a36..2c85237 100644 --- a/product/pc/src/main/ets/pages/customPassword.ets +++ b/product/pc/src/main/ets/pages/customPassword.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Trace from '../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Trace} from '../../../../../../common/src/main/ets/default/Trace' +import {Log} from '../../../../../../common/src/main/ets/default/Log' import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' import StatusBar from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/statusBar' import CustomPSD from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/customPSD' import Constants from '../common/constants' diff --git a/product/pc/src/main/ets/pages/customscreenlock.ets b/product/pc/src/main/ets/pages/customscreenlock.ets index 514cb35..edf8e5b 100644 --- a/product/pc/src/main/ets/pages/customscreenlock.ets +++ b/product/pc/src/main/ets/pages/customscreenlock.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '../../../../../../common/src/main/ets/default/Log' const TAG = 'ScreenLock-CustomScreenlock' diff --git a/product/pc/src/main/ets/pages/digitalPassword.ets b/product/pc/src/main/ets/pages/digitalPassword.ets index 51d076f..6fed0fa 100644 --- a/product/pc/src/main/ets/pages/digitalPassword.ets +++ b/product/pc/src/main/ets/pages/digitalPassword.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Trace from '../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Trace} from '../../../../../../common/src/main/ets/default/Trace' +import {Log} from '../../../../../../common/src/main/ets/default/Log' import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' import StatusBar from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/statusBar' import DigitalPSD from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/digitalPSD' import Constants from '../common/constants' diff --git a/product/pc/src/main/ets/pages/index.ets b/product/pc/src/main/ets/pages/index.ets index 58ced0e..0547d1d 100644 --- a/product/pc/src/main/ets/pages/index.ets +++ b/product/pc/src/main/ets/pages/index.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log' -import Trace from '../../../../../../common/src/main/ets/default/Trace' +import {Log} from '../../../../../../common/src/main/ets/default/Log' +import {Trace} from '../../../../../../common/src/main/ets/default/Trace' import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' import {LockStyleMode} from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenlockStyle' import ViewModel from '../vm/indexViewModel' import SlideScreenLock from './slidescreenlock' diff --git a/product/pc/src/main/ets/pages/journalscreenlock.ets b/product/pc/src/main/ets/pages/journalscreenlock.ets index e435965..dff0874 100644 --- a/product/pc/src/main/ets/pages/journalscreenlock.ets +++ b/product/pc/src/main/ets/pages/journalscreenlock.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '../../../../../../common/src/main/ets/default/Log' const TAG = 'ScreenLock-JournalScreenlock' diff --git a/product/pc/src/main/ets/pages/mixedPassword.ets b/product/pc/src/main/ets/pages/mixedPassword.ets index 58c1c5e..e76d9a3 100644 --- a/product/pc/src/main/ets/pages/mixedPassword.ets +++ b/product/pc/src/main/ets/pages/mixedPassword.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Trace from '../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Trace} from '../../../../../../common/src/main/ets/default/Trace' +import {Log} from '../../../../../../common/src/main/ets/default/Log' import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' import StatusBar from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/statusBar' import MixedPSD from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/mixedPSD' import Constants from '../common/constants' diff --git a/product/pc/src/main/ets/pages/slidescreenlock.ets b/product/pc/src/main/ets/pages/slidescreenlock.ets index dacad49..a86de6f 100644 --- a/product/pc/src/main/ets/pages/slidescreenlock.ets +++ b/product/pc/src/main/ets/pages/slidescreenlock.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '../../../../../../common/src/main/ets/default/Log' import Accounts from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/accounts' import DateTime from '../../../../../../features/datetimecomponent/src/main/ets/com/ohos/view/component/dateTime' import BatterySoc from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/batterySoc' diff --git a/product/pc/src/main/ets/vm/indexViewModel.ts b/product/pc/src/main/ets/vm/indexViewModel.ts index bd4aaf6..29c0d1e 100644 --- a/product/pc/src/main/ets/vm/indexViewModel.ts +++ b/product/pc/src/main/ets/vm/indexViewModel.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; +import {Log} from '../../../../../../common/src/main/ets/default/Log'; import ScreenlockStyle, {LockStyleMode } from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenlockStyle' import ScreenLockService from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenLockService' diff --git a/product/pc/src/main/ets/vm/slideScreenLockViewModel.ts b/product/pc/src/main/ets/vm/slideScreenLockViewModel.ts index 5a8bfda..7c0f609 100644 --- a/product/pc/src/main/ets/vm/slideScreenLockViewModel.ts +++ b/product/pc/src/main/ets/vm/slideScreenLockViewModel.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; +import {Log} from '../../../../../../common/src/main/ets/default/Log'; import ScreenLockService from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenLockService' import Constants from '../common/constants' import {Callback} from '@ohos.base'; diff --git a/product/phone/src/main/ets/AbilityStage.ts b/product/phone/src/main/ets/AbilityStage.ts index f9b1f6e..eb831f4 100644 --- a/product/phone/src/main/ets/AbilityStage.ts +++ b/product/phone/src/main/ets/AbilityStage.ts @@ -14,7 +14,7 @@ */ import AbilityStage from "@ohos.application.AbilityStage" -import Log from '../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' const TAG = "ScreenLock-MainAbilityStage" diff --git a/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts b/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts index bbe067d..e867d62 100644 --- a/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts +++ b/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts @@ -16,9 +16,9 @@ import ServiceExtension from '@ohos.app.ability.ServiceExtensionAbility' import windowManager from '@ohos.window' import display from '@ohos.display' -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Constants from '../../../../../../features/screenlock/src/main/ets/com/ohos/common/constants' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '@ohos/common' import sTimeManager from '../../../../../../common/src/main/ets/default/TimeManager' import { UIContext } from '@ohos.arkui.UIContext' diff --git a/product/phone/src/main/ets/common/StyleConfiguration.ts b/product/phone/src/main/ets/common/StyleConfiguration.ts index 3fa9a07..ad3e58a 100644 --- a/product/phone/src/main/ets/common/StyleConfiguration.ts +++ b/product/phone/src/main/ets/common/StyleConfiguration.ts @@ -14,7 +14,7 @@ */ import StyleManager from '../../../../../../common/src/main/ets/default/StyleManager'; -import Log from '../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' const TAG = 'Lock_StatusBar-StyleConfiguration'; diff --git a/product/phone/src/main/ets/common/StyleManager.ts b/product/phone/src/main/ets/common/StyleManager.ts index 5a6c851..53b1815 100644 --- a/product/phone/src/main/ets/common/StyleManager.ts +++ b/product/phone/src/main/ets/common/StyleManager.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager'; +import {Log} from '@ohos/common' +import {AbilityManager} from '@ohos/common' import IndexStyleConfiguration from './StyleConfiguration' const TAG = 'StatusBar-StyleManager'; diff --git a/product/phone/src/main/ets/pages/customPassword.ets b/product/phone/src/main/ets/pages/customPassword.ets index 79bb1b2..e75f6d3 100644 --- a/product/phone/src/main/ets/pages/customPassword.ets +++ b/product/phone/src/main/ets/pages/customPassword.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Trace from '../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Trace} from '@ohos/common' +import {Log} from '@ohos/common' import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '@ohos/common' import StatusBar from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/statusBar' import CustomPSD from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/customPSD' import Constants from '../common/constants' diff --git a/product/phone/src/main/ets/pages/customscreenlock.ets b/product/phone/src/main/ets/pages/customscreenlock.ets index 514cb35..0b0f901 100644 --- a/product/phone/src/main/ets/pages/customscreenlock.ets +++ b/product/phone/src/main/ets/pages/customscreenlock.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' const TAG = 'ScreenLock-CustomScreenlock' diff --git a/product/phone/src/main/ets/pages/digitalPassword.ets b/product/phone/src/main/ets/pages/digitalPassword.ets index a9dfff0..1e975a5 100644 --- a/product/phone/src/main/ets/pages/digitalPassword.ets +++ b/product/phone/src/main/ets/pages/digitalPassword.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Trace from '../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Trace} from '@ohos/common' +import {Log} from '@ohos/common' import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '@ohos/common' import StatusBar from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/statusBar' import DigitalPSD from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/digitalPSD' import Constants from '../common/constants' diff --git a/product/phone/src/main/ets/pages/index.ets b/product/phone/src/main/ets/pages/index.ets index 9c17ef5..e7a2f68 100644 --- a/product/phone/src/main/ets/pages/index.ets +++ b/product/phone/src/main/ets/pages/index.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log' -import Trace from '../../../../../../common/src/main/ets/default/Trace' +import {Log} from '@ohos/common' +import {Trace} from '@ohos/common' import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '@ohos/common' import {LockStyleMode} from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenlockStyle' import ViewModel from '../vm/indexViewModel' import SlideScreenLock from './slidescreenlock' diff --git a/product/phone/src/main/ets/pages/journalscreenlock.ets b/product/phone/src/main/ets/pages/journalscreenlock.ets index e435965..adc7d80 100644 --- a/product/phone/src/main/ets/pages/journalscreenlock.ets +++ b/product/phone/src/main/ets/pages/journalscreenlock.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' const TAG = 'ScreenLock-JournalScreenlock' diff --git a/product/phone/src/main/ets/pages/mixedPassword.ets b/product/phone/src/main/ets/pages/mixedPassword.ets index faf2487..2230912 100644 --- a/product/phone/src/main/ets/pages/mixedPassword.ets +++ b/product/phone/src/main/ets/pages/mixedPassword.ets @@ -13,10 +13,10 @@ * limitations under the License. */ -import Trace from '../../../../../../common/src/main/ets/default/Trace' -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Trace} from '@ohos/common' +import {Log} from '@ohos/common' import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import AbilityManager from '../../../../../../common/src/main/ets/default/abilitymanager/abilityManager' +import {AbilityManager} from '@ohos/common' import StatusBar from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/statusBar' import MixedPSD from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/mixedPSD' import Constants from '../common/constants' diff --git a/product/phone/src/main/ets/pages/slidescreenlock.ets b/product/phone/src/main/ets/pages/slidescreenlock.ets index 67cc1de..3213883 100644 --- a/product/phone/src/main/ets/pages/slidescreenlock.ets +++ b/product/phone/src/main/ets/pages/slidescreenlock.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log' +import {Log} from '@ohos/common' import Accounts from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/accounts' import {UserData} from '../../../../../../features/screenlock/src/main/ets/com/ohos/data/userData' import DateTime from '../../../../../../features/datetimecomponent/src/main/ets/com/ohos/view/component/dateTime' diff --git a/product/phone/src/main/ets/vm/indexViewModel.ts b/product/phone/src/main/ets/vm/indexViewModel.ts index 7eb2218..becc9ee 100644 --- a/product/phone/src/main/ets/vm/indexViewModel.ts +++ b/product/phone/src/main/ets/vm/indexViewModel.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import ScreenlockStyle, {LockStyleMode} from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenlockStyle' import ScreenLockService from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenLockService' diff --git a/product/phone/src/main/ets/vm/slideScreenLockViewModel.ts b/product/phone/src/main/ets/vm/slideScreenLockViewModel.ts index f4699f5..17a20df 100644 --- a/product/phone/src/main/ets/vm/slideScreenLockViewModel.ts +++ b/product/phone/src/main/ets/vm/slideScreenLockViewModel.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Log from '../../../../../../common/src/main/ets/default/Log'; +import {Log} from '@ohos/common' import ScreenLockService from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenLockService' import Constants from '../common/constants' import {Callback} from '@ohos.base';