From c0dd7df0e70faba3b4024e93b7859b693fb1aa1f Mon Sep 17 00:00:00 2001 From: 18671941053 Date: Thu, 15 Aug 2024 10:52:32 +0800 Subject: [PATCH] zjj0815 Signed-off-by: 18671941053 --- common/index.ts | 9 +++++---- common/src/main/ets/default/DateTimeCommon.ts | 12 +++++++++--- .../src/main/ets/default/ScreenLockManager.ts | 4 ++-- .../src/main/ets/default/StyleConfiguration.ts | 4 ++-- common/src/main/ets/default/StyleManager.ts | 11 ++++++++--- common/src/main/ets/default/TimeManager.ts | 11 ++++++++--- common/src/main/ets/default/WindowManager.ts | 11 +++++++++-- .../default/commonEvent/CommonEventManager.ts | 4 ++-- .../src/main/ets/default/event/EventManager.ts | 12 ++++++++---- common/src/main/ets/default/event/index.ts | 2 +- common/src/main/ets/default/index.ts | 8 ++++---- .../src/main/ets/default/batteryModel.ts | 9 +-------- .../ets/default/common/StyleConfiguration.ts | 8 +++----- .../src/main/ets/default/pages/batteryIcon.ets | 6 +----- .../src/main/ets/default/pages/batteryPic.ets | 1 - .../src/main/ets/default/pages/batterySoc.ets | 1 - .../ets/default/common/StyleConfiguration.ts | 4 ++-- .../src/main/ets/default/pages/clockIcon.ets | 17 ++++------------- .../ets/com/ohos/view/component/dateTime.ets | 1 - .../main/ets/com/ohos/vm/dateTimeViewModel.ts | 16 +++++----------- .../ohos/noticeItem/model/NotificationConfig.ts | 2 -- .../model/NotificationDistributionManager.ts | 1 - .../noticeItem/model/NotificationManager.ts | 1 - .../noticeItem/model/NotificationService.ts | 3 +-- .../model/NotificationWindowManager.ts | 6 ++---- .../com/ohos/noticeItem/model/ParseDataUtil.ts | 4 +--- .../noticeItem/model/rule/RuleController.ts | 7 ++----- .../view/NotificationListComponent.ets | 3 +-- .../noticeItem/view/item/actionComponent.ets | 3 +-- .../view/item/bannerNotificationItem.ets | 10 +++------- .../ohos/noticeItem/view/item/generalItem.ets | 3 +-- .../ohos/noticeItem/view/item/pictureItem.ets | 1 - .../ohos/noticeItem/view/item/settingDialog.ets | 8 ++------ .../com/ohos/noticeItem/view/item/titleItem.ets | 1 - .../com/ohos/noticeItem/viewmodel/ViewModel.ts | 9 ++------- .../main/ets/com/ohos/model/accountsModel.ts | 9 ++------- .../main/ets/com/ohos/model/screenLockModel.ts | 4 +--- .../ets/com/ohos/model/screenLockService.ts | 7 +------ .../main/ets/com/ohos/model/screenlockStyle.ts | 4 ++-- .../ets/com/ohos/view/component/accounts.ets | 6 ++---- .../ets/com/ohos/view/component/batterySoc.ets | 1 - .../ets/com/ohos/view/component/lockIcon.ets | 3 +-- .../ets/com/ohos/view/component/statusBar.ets | 1 - .../src/main/ets/com/ohos/vm/StatusBarVM.ts | 8 +++----- .../main/ets/com/ohos/vm/customPSDViewModel.ts | 3 +-- .../main/ets/com/ohos/vm/digitalPSDViewModel.ts | 3 +-- .../main/ets/com/ohos/vm/lockIconViewModel.ts | 3 +-- .../main/ets/com/ohos/vm/mixedPSDViewModel.ts | 5 ++--- .../ets/com/ohos/view/component/shortcut.ets | 1 - .../ets/default/common/StyleConfiguration.ts | 5 ++--- .../src/main/ets/default/pages/signalIcon.ets | 5 +---- .../ets/com/ohos/view/component/wallpaper.ets | 1 - .../ets/default/common/StyleConfiguration.ts | 5 ++--- .../src/main/ets/default/pages/wifiIcon.ets | 5 +---- .../ets/ServiceExtAbility/ServiceExtAbility.ts | 5 +---- .../src/main/ets/common/StyleConfiguration.ts | 5 ++--- product/pc/src/main/ets/common/StyleManager.ts | 5 +---- .../pc/src/main/ets/pages/customPassword.ets | 5 +---- .../pc/src/main/ets/pages/digitalPassword.ets | 5 +---- product/pc/src/main/ets/pages/index.ets | 5 +---- product/pc/src/main/ets/pages/mixedPassword.ets | 5 +---- product/pc/src/main/ets/vm/indexViewModel.ts | 5 ++--- .../src/main/ets/vm/slideScreenLockViewModel.ts | 2 +- .../ets/ServiceExtAbility/ServiceExtAbility.ts | 4 +--- .../src/main/ets/common/StyleConfiguration.ts | 5 ++--- .../phone/src/main/ets/common/StyleManager.ts | 4 +--- .../phone/src/main/ets/pages/customPassword.ets | 5 +---- .../src/main/ets/pages/digitalPassword.ets | 5 +---- product/phone/src/main/ets/pages/index.ets | 5 +---- .../phone/src/main/ets/pages/mixedPassword.ets | 5 +---- .../src/main/ets/pages/slidescreenlock.ets | 1 - 71 files changed, 132 insertions(+), 236 deletions(-) diff --git a/common/index.ts b/common/index.ts index 2366c43..789419d 100644 --- a/common/index.ts +++ b/common/index.ts @@ -16,21 +16,22 @@ export { CheckEmptyUtils, Constants, - DateTimeCommon, + dateTimeCommon, Log, ReadConfigUtil, createOrGet, StyleConfiguration, - StyleManager, + styleManager, SwitchUserManager, WriteFaultLog, SysFaultLogger, FaultID, Trace, - TimeManager, + sTimeManager, TimeEventArgs, TIME_CHANGE_EVENT, WindowType, + sWindowManager, ScreenLockStatus, ReadConfigFile } from './src/main/ets/default' @@ -49,7 +50,7 @@ export { export { - EventManager, + sEventManager, unsubscribe, obtainLocalEvent, obtainStartAbility diff --git a/common/src/main/ets/default/DateTimeCommon.ts b/common/src/main/ets/default/DateTimeCommon.ts index adbb121..b296bf5 100644 --- a/common/src/main/ets/default/DateTimeCommon.ts +++ b/common/src/main/ets/default/DateTimeCommon.ts @@ -15,6 +15,14 @@ import { ConvertLunarCalendar } from '../../../../../common/src/main/ets/default/LunarCalendar' export class DateTimeCommon { + + static getInstance(): DateTimeCommon { + if (globalThis.DateTimeCommon == null) { + globalThis.DateTimeCommon = new DateTimeCommon(); + } + return globalThis.DateTimeCommon; + } + getSystemTime(isUsing24hFormat: boolean) { let dateTime = new Date(); let hours = dateTime.getHours(); @@ -90,6 +98,4 @@ export class DateTimeCommon { } } -let dateTimeCommon = new DateTimeCommon(); - -export default dateTimeCommon as DateTimeCommon +export let dateTimeCommon = DateTimeCommon.getInstance(); \ No newline at end of file diff --git a/common/src/main/ets/default/ScreenLockManager.ts b/common/src/main/ets/default/ScreenLockManager.ts index 569cf5e..9f61813 100644 --- a/common/src/main/ets/default/ScreenLockManager.ts +++ b/common/src/main/ets/default/ScreenLockManager.ts @@ -16,7 +16,7 @@ import commonEvent from "@ohos.commonEvent"; import { CommonEventSubscriber } from "commonEvent/commonEventSubscriber"; import {createOrGet} from "./SingleInstanceHelper"; -import EventManager from "./event/EventManager"; +import {sEventManager} from "./event/EventManager"; import {Log} from "./Log"; import { obtainLocalEvent } from "./event/EventUtil"; import { debounce } from "./Decorators"; @@ -54,7 +54,7 @@ class ScreenLockManager { @debounce(debounceTimeout) notifyScreenEvent(isScreenOn: boolean) { - EventManager.publish(obtainLocalEvent(SCREEN_CHANGE_EVENT, isScreenOn)); + sEventManager.publish(obtainLocalEvent(SCREEN_CHANGE_EVENT, isScreenOn)); Log.showDebug(TAG, `publish ${SCREEN_CHANGE_EVENT} screenState: ${isScreenOn}`); } } diff --git a/common/src/main/ets/default/StyleConfiguration.ts b/common/src/main/ets/default/StyleConfiguration.ts index fa24da6..964e1c9 100644 --- a/common/src/main/ets/default/StyleConfiguration.ts +++ b/common/src/main/ets/default/StyleConfiguration.ts @@ -13,14 +13,14 @@ * limitations under the License. */ -import StyleManager from './StyleManager'; +import {styleManager} from './StyleManager'; const TAG = 'Common-StyleConfiguration'; export class StyleConfiguration { static getCommonStyle() { const key: string = TAG + "-Common"; - return StyleManager.getStyle(key, () => { + return styleManager.getStyle(key, () => { return { statusBarFontSize: $r("app.float.signal_fontSize"), statusBarIconWidth: '24vp', diff --git a/common/src/main/ets/default/StyleManager.ts b/common/src/main/ets/default/StyleManager.ts index eb5de48..d303ac2 100644 --- a/common/src/main/ets/default/StyleManager.ts +++ b/common/src/main/ets/default/StyleManager.ts @@ -20,6 +20,13 @@ const TAG = 'Common-StyleManager'; export class StyleManager { mAbilityPageName: string = ''; + static getInstance(): StyleManager { + if (globalThis.StyleManager == null) { + globalThis.StyleManager = new StyleManager(); + } + return globalThis.StyleManager; + } + setAbilityPageName(name: string): void{ Log.showDebug(TAG, `setAbilityPageName, name: ${name}`); this.mAbilityPageName = name; @@ -36,6 +43,4 @@ export class StyleManager { } } -let styleManager = new StyleManager(); - -export default styleManager as StyleManager; \ No newline at end of file +export let styleManager = StyleManager.getInstance(); \ No newline at end of file diff --git a/common/src/main/ets/default/TimeManager.ts b/common/src/main/ets/default/TimeManager.ts index 212e5f6..7aad1a3 100644 --- a/common/src/main/ets/default/TimeManager.ts +++ b/common/src/main/ets/default/TimeManager.ts @@ -57,6 +57,13 @@ export class TimeManager { private mSettingsHelper?: DataAbilityHelper; private mManager?: CommonEventManager; + static getInstance(): TimeManager { + if (globalThis.TimeManager == null) { + globalThis.TimeManager = new TimeManager(); + } + return globalThis.TimeManager; + } + public init(context: any) { this.mManager = getCommonEventManager( TAG, @@ -118,6 +125,4 @@ export class TimeManager { } } -let sTimeManager = createOrGet(TimeManager, TAG); - -export default sTimeManager as TimeManager; +export let sTimeManager = sTimeManager.getInstance(); diff --git a/common/src/main/ets/default/WindowManager.ts b/common/src/main/ets/default/WindowManager.ts index 40e1ee6..a5ebf74 100644 --- a/common/src/main/ets/default/WindowManager.ts +++ b/common/src/main/ets/default/WindowManager.ts @@ -60,6 +60,13 @@ const DEFAULT_WINDOW_INFO: WindowInfo = { class WindowManager { mWindowInfos: Map = new Map(); + static getInstance(): WindowManager { + if (globalThis.WindowManager == null) { + globalThis.WindowManager = new WindowManager(); + } + return globalThis.WindowManager; + } + async createWindow(context: any, name: WindowType, rect: Rect, loadContent: string): Promise { Log.showInfo(TAG, `createWindow name: ${name}, rect: ${JSON.stringify(rect)}, url: ${loadContent}`); let winHandle = null; @@ -150,5 +157,5 @@ class WindowManager { } } -let sWindowManager = createOrGet(WindowManager, TAG); -export default sWindowManager as WindowManager; +export let sWindowManager = WindowManager.getInstance(); + diff --git a/common/src/main/ets/default/commonEvent/CommonEventManager.ts b/common/src/main/ets/default/commonEvent/CommonEventManager.ts index 05affb7..5215541 100644 --- a/common/src/main/ets/default/commonEvent/CommonEventManager.ts +++ b/common/src/main/ets/default/commonEvent/CommonEventManager.ts @@ -15,7 +15,7 @@ import commonEvent from "@ohos.commonEvent"; import { CommonEventData } from "commonEvent/commonEventData"; -import EventManager from "../event/EventManager"; +import {sEventManager} from "../event/EventManager"; import {Log} from "../Log"; import { SCREEN_CHANGE_EVENT } from "../ScreenLockManager"; @@ -91,7 +91,7 @@ export function getCommonEventManager( } function ScreenPolicy(manager: InnerManager): ClearPolicy { - return EventManager.subscribe(SCREEN_CHANGE_EVENT, (isScreenOn: boolean) => { + return sEventManager.subscribe(SCREEN_CHANGE_EVENT, (isScreenOn: boolean) => { isScreenOn ? manager.subscriberCommonEvent() : manager.unSubscriberCommonEvent(); }); } diff --git a/common/src/main/ets/default/event/EventManager.ts b/common/src/main/ets/default/event/EventManager.ts index e4db31a..0043bf5 100644 --- a/common/src/main/ets/default/event/EventManager.ts +++ b/common/src/main/ets/default/event/EventManager.ts @@ -15,7 +15,6 @@ import ServiceExtensionContext from "application/ServiceExtensionContext"; import {Log} from "../Log"; -import {createOrGet} from "../SingleInstanceHelper"; import { EventParser, START_ABILITY_EVENT, Event, LocalEvent } from "./EventUtil"; import { Callback, createEventBus, EventBus } from "./EventBus"; @@ -29,6 +28,13 @@ export class EventManager { eventParser: EventParser; mContext: ServiceExtensionContext | undefined; + static getInstance(): EventManager { + if (globalThis.EventManager == null) { + globalThis.EventManager = new EventManager(); + } + return globalThis.EventManager; + } + constructor() { this.mEventBus = createEventBus(); this.eventParser = { @@ -87,6 +93,4 @@ export class EventManager { } } -let sEventManager = createOrGet(EventManager, TAG); - -export default sEventManager as EventManager; \ No newline at end of file +export let sEventManager = EventManager.getInstance(); \ No newline at end of file diff --git a/common/src/main/ets/default/event/index.ts b/common/src/main/ets/default/event/index.ts index 85041f6..dff5589 100644 --- a/common/src/main/ets/default/event/index.ts +++ b/common/src/main/ets/default/event/index.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -export { EventManager } from './EventManager' +export { sEventManager } from './EventManager' export { unsubscribe } from './EventManager' diff --git a/common/src/main/ets/default/index.ts b/common/src/main/ets/default/index.ts index 1f2ef81..ce870c6 100644 --- a/common/src/main/ets/default/index.ts +++ b/common/src/main/ets/default/index.ts @@ -17,7 +17,7 @@ export { CheckEmptyUtils } from './CheckEmptyUtils' export { Constants } from './Constants' -export { DateTimeCommon } from './DateTimeCommon' +export { dateTimeCommon } from './DateTimeCommon' export { Log } from './Log' @@ -27,7 +27,7 @@ export { createOrGet } from './SingleInstanceHelper' export { StyleConfiguration } from './StyleConfiguration' -export { StyleManager } from './StyleManager' +export { styleManager } from './StyleManager' export { SwitchUserManager } from './SwitchUserManager' @@ -41,9 +41,9 @@ export { TimeEventArgs } from './TimeManager' export { TIME_CHANGE_EVENT } from './TimeManager' -export { TimeManager } from './TimeManager' +export { sTimeManager } from './TimeManager' -export { WindowType } from './WindowManager' +export { WindowType, sWindowManager } from './WindowManager' export { FaultID } from './SysFaultLogger' diff --git a/features/batterycomponent/src/main/ets/default/batteryModel.ts b/features/batterycomponent/src/main/ets/default/batteryModel.ts index aab8054..8f344cd 100644 --- a/features/batterycomponent/src/main/ets/default/batteryModel.ts +++ b/features/batterycomponent/src/main/ets/default/batteryModel.ts @@ -16,15 +16,8 @@ import BatteryInfo from "@ohos.batteryInfo"; import commonEvent from "@ohos.commonEvent"; -import {createOrGet} from '@ohos/common'; +import {Log, createOrGet, CommonEventManager, getCommonEventManager, POLICY} from '@ohos/common'; import Constants from "./common/constants"; -import {Log} from '@ohos/common'; -import { CommonEventData } from "commonEvent/commonEventData"; -import { - CommonEventManager, - getCommonEventManager, - 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 0ae32f0..af937e6 100644 --- a/features/batterycomponent/src/main/ets/default/common/StyleConfiguration.ts +++ b/features/batterycomponent/src/main/ets/default/common/StyleConfiguration.ts @@ -13,16 +13,14 @@ * limitations under the License. */ -import StyleManager from '../../../../../../../common/src/main/ets/default/StyleManager'; -// import {StyleManager} from '@ohos/common' -import Constants from './constants' +import {styleManager} from '@ohos/common' const TAG = 'battery-StyleConfiguration'; export default class StyleConfiguration { static getBatteryComponentStyle() { const key: string = TAG + "-BatteryComponent"; - return StyleManager.getStyle(key, () => { + return styleManager.getStyle(key, () => { return { componentGap: $r('app.float.battery_component_gap') }; @@ -31,7 +29,7 @@ export default class StyleConfiguration { static getBatteryPicStyle() { const key: string = TAG + "-BatteryPicComponent"; - return StyleManager.getStyle(key, () => { + return styleManager.getStyle(key, () => { return { picGap: $r('app.float.battery_component_pic_gap'), picBodyWidth: $r('app.float.battery_component_pic_body_width'), diff --git a/features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets b/features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets index 38d4d7d..bd130c1 100644 --- a/features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets +++ b/features/batterycomponent/src/main/ets/default/pages/batteryIcon.ets @@ -16,12 +16,8 @@ import mBatteryModel from '../batteryModel'; import BatteryPic from './batteryPic' import BatterySoc from './batterySoc' -import Constants from '../common/constants' 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' +import {StatusBarGroupComponentData} from '../../../../../../screenlock/src/main/ets/com/ohos/common/constants' import StatusBarVM from '../../../../../../screenlock/src/main/ets/com/ohos/vm/StatusBarVM' const TAG = 'BatteryComponent-batteryIcon' diff --git a/features/batterycomponent/src/main/ets/default/pages/batteryPic.ets b/features/batterycomponent/src/main/ets/default/pages/batteryPic.ets index 8a26650..392a75a 100644 --- a/features/batterycomponent/src/main/ets/default/pages/batteryPic.ets +++ b/features/batterycomponent/src/main/ets/default/pages/batteryPic.ets @@ -15,7 +15,6 @@ import Constants from '../common/constants' 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 23474e5..2d4de90 100644 --- a/features/batterycomponent/src/main/ets/default/pages/batterySoc.ets +++ b/features/batterycomponent/src/main/ets/default/pages/batterySoc.ets @@ -14,7 +14,6 @@ */ import {Log} from '@ohos/common'; -// import {StyleConfigurationCommon} from '../../../../../../../common/src/main/ets/default/StyleConfiguration' const TAG = 'BatteryComponent-batterySoc' diff --git a/features/clockcomponent/src/main/ets/default/common/StyleConfiguration.ts b/features/clockcomponent/src/main/ets/default/common/StyleConfiguration.ts index 0d70e4e..1c4ba99 100644 --- a/features/clockcomponent/src/main/ets/default/common/StyleConfiguration.ts +++ b/features/clockcomponent/src/main/ets/default/common/StyleConfiguration.ts @@ -13,14 +13,14 @@ * limitations under the License. */ -import StyleManager from '../../../../../../../common/src/main/ets/default/StyleManager'; +import {styleManager} from '@ohos/common'; const TAG = 'clock-StyleConfiguration'; export default class StyleConfiguration { static getClockComponentStyle() { const key: string = TAG + "-ClockComponent"; - return StyleManager.getStyle(key, () => { + return styleManager.getStyle(key, () => { return { statusBarClockMaxWidth: $r('app.float.status_bar_clock_width') }; diff --git a/features/clockcomponent/src/main/ets/default/pages/clockIcon.ets b/features/clockcomponent/src/main/ets/default/pages/clockIcon.ets index 4c5c88c..bd8318e 100644 --- a/features/clockcomponent/src/main/ets/default/pages/clockIcon.ets +++ b/features/clockcomponent/src/main/ets/default/pages/clockIcon.ets @@ -13,18 +13,9 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import StyleConfiguration from '../common/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 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' +import {Log, TimeEventArgs, TIME_CHANGE_EVENT, sEventManager, unsubscribe, sTimeManager} from '@ohos/common' const TAG = 'ClockComponent-clockIcon'; @@ -41,10 +32,10 @@ export default struct ClockIcon { aboutToAppear() { Log.showInfo(TAG, 'aboutToAppear'); this.mStatusBarGroupComponentData = StatusBarVM.getStatusBarGroupComponentData(this.mGroupId) - this.unSubscriber = EventManager.subscribe(TIME_CHANGE_EVENT, (args: TimeEventArgs) => { - this.mTime = TimeManager.formatTime(args.date); + this.unSubscriber = sEventManager.subscribe(TIME_CHANGE_EVENT, (args: TimeEventArgs) => { + this.mTime = sTimeManager.formatTime(args.date); }); - this.mTime = TimeManager.formatTime(new Date()); + this.mTime = sTimeManager.formatTime(new Date()); } aboutToDisappear() { 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 ce8a3f7..6653805 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 @@ -16,7 +16,6 @@ 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 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 74fe15a..36451e7 100644 --- a/features/datetimecomponent/src/main/ets/com/ohos/vm/dateTimeViewModel.ts +++ b/features/datetimecomponent/src/main/ets/com/ohos/vm/dateTimeViewModel.ts @@ -13,14 +13,8 @@ * limitations under the License. */ -import featureAbility from '@ohos.ability.featureAbility' import commonEvent from '@ohos.commonEvent'; -import {Log} from '@ohos/common' -import DateTimeCommon from '../../../../../../../../common/src/main/ets/default/DateTimeCommon' -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' +import {Log, dateTimeCommon, sTimeManager, TimeEventArgs, TIME_CHANGE_EVENT, sEventManager, unsubscribe} from '@ohos/common' const TAG = 'ScreenLock-DateTimeViewModel' @@ -49,7 +43,7 @@ export default class DateTimeViewModel { this.getAndSetDateTime.bind(this)() commonEvent.createSubscriber(mCommonEventSubscribeInfo, this.createSubscriberCallBack.bind(this)); - this.unSubscriber = EventManager.subscribe(TIME_CHANGE_EVENT, (args: TimeEventArgs) => { + this.unSubscriber = sEventManager.subscribe(TIME_CHANGE_EVENT, (args: TimeEventArgs) => { this.setDateTime(args.date) }); Log.showDebug(TAG, 'ViewModelInit end'); @@ -63,9 +57,9 @@ export default class DateTimeViewModel { private setDateTime(date: Date) { Log.showDebug(TAG, `setDateTime`) this.timeVal = sTimeManager.formatTime(date) - this.dateVal = DateTimeCommon.getSystemDate() - this.weekVal = DateTimeCommon.getSystemWeek() - this.calendarVal = DateTimeCommon.getCalendarDate() + this.dateVal = dateTimeCommon.getSystemDate() + this.weekVal = dateTimeCommon.getSystemWeek() + this.calendarVal = dateTimeCommon.getCalendarDate() } private createSubscriberCallBack(err, data) { 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 b65f93b..3d2b710 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,6 @@ * limitations under the License. */ -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 23459f8..de62f89 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 @@ -15,7 +15,6 @@ import {Log} from '@ohos/common' import DeviceManager from '@ohos.distributedDeviceManager'; -import DeviceInfo from '@ohos.deviceInfo'; const TAG = `NotificationDistributionManager`; 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 d7d07f5..75b7ece 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 @@ -13,7 +13,6 @@ * limitations under the License. */ -//import { NotificationSubscriber } from './notification/notificationSubscriber'; import Notification from '@ohos.notification'; import PluginComponentManager from '@ohos.pluginComponent'; import Systemparameter from '@ohos.systemparameter'; 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 ab4650f..4c47846 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,11 @@ * limitations under the License. */ -import {Log} from '@ohos/common' +import {Log, createOrGet} from '@ohos/common' import NotificationManager from './NotificationManager'; import ParseDataUtil from './ParseDataUtil'; import RuleController from './rule/RuleController'; import CommonUtil from '../common/CommonUtil'; -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 d9b9712..3f8e9c3 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,7 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import EventManager from "../../../../../../../../../common/src/main/ets/default/event/EventManager"; -import {obtainLocalEvent} from '@ohos/common' +import {Log, sEventManager, obtainLocalEvent} from '@ohos/common' const TAG = `NotificationWindowManager`; @@ -26,7 +24,7 @@ class NotificationWindowManager { hideNotificationWindow() { Log.showDebug(TAG, 'hide Notification window'); - EventManager.publish(obtainLocalEvent('hideNotificationWindowEvent', '')); + sEventManager.publish(obtainLocalEvent('hideNotificationWindowEvent', '')); } } 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 3fb6c5d..50f9f94 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,7 @@ */ import AccountManager from '@ohos.account.osAccount'; -import {Log} from '@ohos/common' -import {BundleManager} from '@ohos/common' -import {AbilityManager} from '@ohos/common' +import {Log, BundleManager, 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 a0a3f32..0ba9c5e 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,11 +15,8 @@ */ import {NotificationItemData} from '../../common/constants'; -import {Log} from '@ohos/common' -import {SlotLevel} from '@ohos.notification'; -import Notification from '@ohos.notification'; -import {CheckEmptyUtils} from '@ohos/common'; -import Bundle from '@ohos.bundle'; +import {Log, CheckEmptyUtils} from '@ohos/common' +import Notification, {SlotLevel} from '@ohos.notification'; 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 12ad19b..a6b79fa 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 @@ -14,10 +14,9 @@ */ import {Log} from '@ohos/common' -import Constants, {NotificationLayout as Layout} from '../common/constants'; +import {NotificationLayout as Layout} from '../common/constants'; import NotificationItem from './item/notificationItem' import GroupNotificationItem from './item/groupItem' -import ViewModel from '../viewmodel/ViewModel' const TAG = 'NoticeItem-NotificationListComponent'; 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 5299ed5..fdebb33 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,7 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import {CheckEmptyUtils} from '@ohos/common' +import {Log, 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 0cedb77..3a073dd 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,10 +13,7 @@ * limitations under the License. */ -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 {Log, AbilityManager, sWindowManager, WindowType} from '@ohos/common' import Constants, {NotificationLayout as Layout} from '../../common/constants'; import ViewModel from '../../viewmodel/ViewModel'; import CustomItem from './customItem'; @@ -32,7 +29,6 @@ import WantAgent from '@ohos.wantAgent'; const TAG = 'NoticeItem-BannerNotificationItem' const INTERVAL = 5 * 1000 - @Component export default struct BannerNotificationItem { @State want : any = {}; @@ -133,8 +129,8 @@ export default struct BannerNotificationItem { width: this.mDefaultBannerRect['width'], height: heightWin }; - WindowManager.resetSizeWindow(WindowType.BANNER_NOTICE, bannerRect); - WindowManager.showWindow(WindowType.BANNER_NOTICE); + sWindowManager.resetSizeWindow(WindowType.BANNER_NOTICE, bannerRect); + sWindowManager.showWindow(WindowType.BANNER_NOTICE); }) } } else { 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 84ac557..45a2bcf 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,7 @@ import longItem from './longItem'; import multiItem from './multiItem'; import pictureItem from './pictureItem'; import titleItem from './titleItem'; -import {Log} from '@ohos/common' -import {CheckEmptyUtils} from '@ohos/common' +import {Log, 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/pictureItem.ets b/features/noticeitem/src/main/ets/com/ohos/noticeItem/view/item/pictureItem.ets index d763de9..6cf5f41 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,6 @@ */ import Constants, {NotificationItemData, NotificationLayout as Layout} from '../../common/constants'; -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 5c9382c..4937546 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,11 +14,7 @@ */ import Constants,{NotificationItemData} from '../../common/constants'; -import {Log} from '@ohos/common' -import {CheckEmptyUtils} from '@ohos/common' -import EventManager from "../../../../../../../../../../common/src/main/ets/default/event/EventManager" -import {obtainStartAbility} from '@ohos/common' -import Notification from '@ohos.notification'; +import {Log, CheckEmptyUtils, sEventManager, obtainStartAbility} from '@ohos/common' const TAG = 'NoticeItem-Setting'; @@ -115,7 +111,7 @@ export default struct SettingDialog { openAbility() { Log.showDebug(TAG, ` openAbility:showNotificationManagement`) - EventManager.publish(obtainStartAbility('com.ohos.systemui', 'com.ohos.systemui.notificationmanagement.MainAbility', + sEventManager.publish(obtainStartAbility('com.ohos.systemui', 'com.ohos.systemui.notificationmanagement.MainAbility', { 'migrateUri': 'pages/setEnable', 'migrateBundle': this.itemData.bundleName })) this.closeAbility() } 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 a124eee..21c0339 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 @@ -15,7 +15,6 @@ import Constants, {NotificationLayout as Layout} from '../../common/constants'; 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 a767d36..686bc27 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,12 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import {SwitchUserManager} from '@ohos/common' +import {Log, SwitchUserManager, CheckEmptyUtils, AbilityManager, obtainLocalEvent, sEventManager} 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 '@ohos/common' -import {AbilityManager} from '@ohos/common' -import EventManager from "../../../../../../../../../common/src/main/ets/default/event/EventManager" -import {obtainLocalEvent} from '@ohos/common' import CommonUtil from '../common/CommonUtil'; import Constants from '../common/constants'; @@ -346,7 +341,7 @@ export class ViewModel { if (itemData.ruleData.isAllowBanner) { Log.showDebug(TAG, `banner start `); AbilityManager.setAbilityData(AbilityManager.ABILITY_NAME_BANNER_NOTICE, 'itemData', itemData); - EventManager.publish(obtainLocalEvent('onBannerNoticeShow', { 'itemData': itemData })) + sEventManager.publish(obtainLocalEvent('onBannerNoticeShow', { 'itemData': itemData })) Log.showDebug(TAG, `banner end `); } if (itemData.notificationFlags?.soundEnabled != Constants.NOTIFICATION_TYPE_CLOSE) { 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 02f1fd2..3221823 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,7 @@ import osAccount from '@ohos.account.osAccount' import commonEvent from '@ohos.commonEvent'; import util from '@ohos.util'; import {Callback} from '@ohos.base'; -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 '@ohos/common' +import {Log, Trace, sEventManager, CommonEventManager, getCommonEventManager, SysFaultLogger, FaultID, obtainLocalEvent} from '@ohos/common' import {UserData} from '../data/userData'; const TAG = "ScreenLock-AccountsModel" @@ -169,7 +164,7 @@ export default class AccountsModel { accountMap.get(user.localId).userIconPath = path; }) } - EventManager.publish(obtainLocalEvent(ACCOUNTS_REFRESH_EVENT, accountList)); + sEventManager.publish(obtainLocalEvent(ACCOUNTS_REFRESH_EVENT, accountList)); }) } 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 38b85af..2971175 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,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {Trace} from '@ohos/common' -import {Log} from '@ohos/common' -import {SysFaultLogger, FaultID} from '@ohos/common' +import {Log, Trace, 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 666cc3e..131891a 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,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {Log} from '@ohos/common' -import {Trace} from '@ohos/common' -import {WriteFaultLog, FaultID} from '@ohos/common' +import {Log, Trace, WriteFaultLog, FaultID, createOrGet, ScreenLockStatus} 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 '@ohos/common' import Router from '@system.router'; import commonEvent from '@ohos.commonEvent'; import hiDebug from '@ohos.hidebug'; @@ -32,7 +28,6 @@ const URI_DIGITALPASSWORD = 'pages/digitalPassword' const URI_MIXEDPASSWORD = 'pages/mixedPassword' const URI_CUSTOMPASSWORD = 'pages/customPassword' - //Event type name const EVENT_BEGIN_WAKEUP: string = 'beginWakeUp' const EVENT_END_WAKEUP: string = 'endWakeUp' 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 da0e2e8..b814fee 100644 --- a/features/screenlock/src/main/ets/com/ohos/model/screenlockStyle.ts +++ b/features/screenlock/src/main/ets/com/ohos/model/screenlockStyle.ts @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {Log} from '@ohos/common' -import {ReadConfigFile} from '../../../../../../../../common/src/main/ets/default/ScreenLockCommon' + +import {Log, ReadConfigFile} from '@ohos/common' const SCREENLOCK_MODE_FILE_NAME = "screenlock.json"; const TAG = 'ScreenLock-ScreenlockStyle'; 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 4c1c56d..59de47e 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,13 +13,11 @@ * limitations under the License. */ -import {Log} from '@ohos/common' +import {Log, sEventManager, unsubscribe} 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 from '../../../../../../../../../common/src/main/ets/default/event/EventManager'; -import {unsubscribe} from '@ohos/common' const TAG = 'ScreenLock-Accounts' @@ -32,7 +30,7 @@ export default struct Accounts { aboutToAppear() { Log.showInfo(TAG, `aboutToAppear`); - this.unSubscriber = EventManager.subscribe(ACCOUNTS_REFRESH_EVENT, (data) => { + this.unSubscriber = sEventManager.subscribe(ACCOUNTS_REFRESH_EVENT, (data) => { this.accountList = data; }); } 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 c571dee..668a658 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 @@ -14,7 +14,6 @@ */ 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/lockIcon.ets b/features/screenlock/src/main/ets/com/ohos/view/component/lockIcon.ets index ea398be..0bcdb4a 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,7 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import {ScreenLockStatus} from '@ohos/common' +import {Log, 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/statusBar.ets b/features/screenlock/src/main/ets/com/ohos/view/component/statusBar.ets index eebef1b..afd6255 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 @@ -14,7 +14,6 @@ */ 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' import ClockIcon from '../../../../../../../../../features/clockcomponent/src/main/ets/default/pages/clockIcon' 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 590da36..3aba251 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/StatusBarVM.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/StatusBarVM.ts @@ -13,10 +13,8 @@ * limitations under the License. */ -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'; +import {Log, sWindowManager, WindowType} from '@ohos/common' +import {StatusBarGroupComponentData} from '../common/constants'; const TAG = 'StatusBarVM'; @@ -41,7 +39,7 @@ export class StatusBarVM { return; } this.mStatusBarEnable = isEnable; - this.mStatusBarEnable ? WindowManager.showWindow(WindowType.STATUS_BAR) : WindowManager.hideWindow(WindowType.STATUS_BAR); + this.mStatusBarEnable ? sWindowManager.showWindow(WindowType.STATUS_BAR) : sWindowManager.hideWindow(WindowType.STATUS_BAR); } getStatusBarGroupComponentData(groupId: string): StatusBarGroupComponentData{ 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 e9252f8..a234577 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,7 @@ * limitations under the License. */ -import {Trace} from '@ohos/common' -import {Log} from '@ohos/common' +import {Log, 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/digitalPSDViewModel.ts b/features/screenlock/src/main/ets/com/ohos/vm/digitalPSDViewModel.ts index 7f201db..cee3f6a 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,7 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import {Trace} from '@ohos/common' +import {Log, 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 d32ea6c..dc46b68 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,7 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import {ScreenLockStatus} from '@ohos/common' +import {Log, 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 9df2aee..6860bd2 100644 --- a/features/screenlock/src/main/ets/com/ohos/vm/mixedPSDViewModel.ts +++ b/features/screenlock/src/main/ets/com/ohos/vm/mixedPSDViewModel.ts @@ -13,9 +13,8 @@ * limitations under the License. */ -import {Trace} from '@ohos/common' -import {Log} from '@ohos/common' -import BaseViewModel, {service, AuthType, AuthSubType} from './baseViewModel' +import {Log, Trace} from '@ohos/common' +import BaseViewModel, {service, AuthSubType} from './baseViewModel' import {Callback} from '@ohos.base'; const TAG = 'ScreenLock-MixedPSDViewModel' 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 303dcaf..ad64988 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 @@ -16,7 +16,6 @@ import {Log} from '@ohos/common' import Constants from '../../common/constants' import ViewModel from '../../vm/shortcutViewModel' -import power from '@ohos.power' const TAG = 'ScreenLock-Shortcut' diff --git a/features/signalcomponent/src/main/ets/default/common/StyleConfiguration.ts b/features/signalcomponent/src/main/ets/default/common/StyleConfiguration.ts index 8ca4fc2..ad93d72 100644 --- a/features/signalcomponent/src/main/ets/default/common/StyleConfiguration.ts +++ b/features/signalcomponent/src/main/ets/default/common/StyleConfiguration.ts @@ -13,15 +13,14 @@ * limitations under the License. */ -import StyleManager from '../../../../../../../common/src/main/ets/default/StyleManager'; -import Constants from './constants' +import {styleManager} from '@ohos/common'; const TAG = 'signal-StyleConfiguration'; export default class StyleConfiguration { static getSignalComponentStyle() { const key: string = TAG + "-SignalComponent"; - return StyleManager.getStyle(key, () => { + return styleManager.getStyle(key, () => { return { cellularImageWidth: $r('app.float.signal_component_icon_width'), cellularImageHeight: $r('app.float.signal_component_icon_height'), diff --git a/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets b/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets index 986fe03..8f01fb9 100644 --- a/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets +++ b/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets @@ -16,10 +16,7 @@ import Constants from '../common/constants'; import mSignalModel from '../signalModel'; 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' +import { StatusBarGroupComponentData} from '../../../../../../screenlock/src/main/ets/com/ohos/common/constants' import StatusBarVM from '../../../../../../screenlock/src/main/ets/com/ohos/vm/StatusBarVM' const TAG = 'SignalComponent-SignalIcon' 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 1037b38..f9cec19 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 @@ -16,7 +16,6 @@ import {Log} from '@ohos/common' import ViewModel from '../../vm/wallpaperViewModel' import Constants from '../../common/constants' -import {Trace} from '@ohos/common' const TAG = 'ScreenLock-Wallpaper' diff --git a/features/wificomponent/src/main/ets/default/common/StyleConfiguration.ts b/features/wificomponent/src/main/ets/default/common/StyleConfiguration.ts index d6e4f89..238021f 100644 --- a/features/wificomponent/src/main/ets/default/common/StyleConfiguration.ts +++ b/features/wificomponent/src/main/ets/default/common/StyleConfiguration.ts @@ -13,15 +13,14 @@ * limitations under the License. */ -import StyleManager from '../../../../../../../common/src/main/ets/default/StyleManager' -import Constants from './constants' +import {styleManager} from '@ohos/common' const TAG = 'wifi-StyleConfiguration'; export default class StyleConfiguration { static getStartsBarWifiComponentStyle() { const key: string = TAG + "-startsBarWifi"; - return StyleManager.getStyle(key, () => { + return styleManager.getStyle(key, () => { return { statusBarWifiWidth: $r('app.float.status_bar_wifi_width'), statusBarWifiHeight: $r('app.float.status_bar_wifi_height') diff --git a/features/wificomponent/src/main/ets/default/pages/wifiIcon.ets b/features/wificomponent/src/main/ets/default/pages/wifiIcon.ets index ced468e..ca0e5ee 100644 --- a/features/wificomponent/src/main/ets/default/pages/wifiIcon.ets +++ b/features/wificomponent/src/main/ets/default/pages/wifiIcon.ets @@ -16,10 +16,7 @@ import Constants from '../common/constants' import mWifiModel from '../wifiModel' 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' +import {StatusBarGroupComponentData} from '../../../../../../screenlock/src/main/ets/com/ohos/common/constants' import StatusBarVM from '../../../../../../screenlock/src/main/ets/com/ohos/vm/StatusBarVM' const TAG = 'WifiComponent-WifiIcon' diff --git a/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts b/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts index f39d0c8..ba9e9f9 100644 --- a/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts +++ b/product/pc/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts @@ -15,12 +15,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, AbilityManager, sTimeManager} 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 sTimeManager from '../../../../../../common/src/main/ets/default/TimeManager' import inputMethod from '@ohos.inputMethod' const TAG = "ScreenLock-ServiceExtAbility" diff --git a/product/pc/src/main/ets/common/StyleConfiguration.ts b/product/pc/src/main/ets/common/StyleConfiguration.ts index 62d14d9..f0366bc 100644 --- a/product/pc/src/main/ets/common/StyleConfiguration.ts +++ b/product/pc/src/main/ets/common/StyleConfiguration.ts @@ -13,8 +13,7 @@ * limitations under the License. */ -import StyleManager from '../../../../../../common/src/main/ets/default/StyleManager'; -import {Log} from '../../../../../../common/src/main/ets/default/Log'; +import {Log, styleManager} from '@ohos/common'; const TAG = 'Lock_StatusBar-StyleConfiguration'; @@ -22,7 +21,7 @@ export default class StyleConfiguration { static getIndexStyle() { Log.showInfo(TAG, `setStyle`) const key: string = TAG + "-Index"; - return StyleManager.getStyle(key, () => { + return styleManager.getStyle(key, () => { return {}; }); } diff --git a/product/pc/src/main/ets/common/StyleManager.ts b/product/pc/src/main/ets/common/StyleManager.ts index 797b868..951be73 100644 --- a/product/pc/src/main/ets/common/StyleManager.ts +++ b/product/pc/src/main/ets/common/StyleManager.ts @@ -13,14 +13,11 @@ * limitations under the License. */ -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 {Log, AbilityManager, StyleConfiguration} from '@ohos/common' 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' import ClockStyleConfiguration from '../../../../../../features/clockcomponent/src/main/ets/default/common/StyleConfiguration'; -import IndexStyleConfiguration from './StyleConfiguration' const TAG = 'Lock-StatusBar-StyleManager'; diff --git a/product/pc/src/main/ets/pages/customPassword.ets b/product/pc/src/main/ets/pages/customPassword.ets index 2c85237..e8fbdeb 100644 --- a/product/pc/src/main/ets/pages/customPassword.ets +++ b/product/pc/src/main/ets/pages/customPassword.ets @@ -13,10 +13,7 @@ * limitations under the License. */ -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 {Trace, Log, styleManager as CommonStyleManager, 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/pc/src/main/ets/pages/digitalPassword.ets b/product/pc/src/main/ets/pages/digitalPassword.ets index 6fed0fa..545b37b 100644 --- a/product/pc/src/main/ets/pages/digitalPassword.ets +++ b/product/pc/src/main/ets/pages/digitalPassword.ets @@ -13,10 +13,7 @@ * limitations under the License. */ -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 {Log, Trace, styleManager as CommonStyleManager, 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/pc/src/main/ets/pages/index.ets b/product/pc/src/main/ets/pages/index.ets index 0547d1d..da1084b 100644 --- a/product/pc/src/main/ets/pages/index.ets +++ b/product/pc/src/main/ets/pages/index.ets @@ -13,10 +13,7 @@ * limitations under the License. */ -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 {Log, Trace, styleManager as CommonStyleManager, 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/pc/src/main/ets/pages/mixedPassword.ets b/product/pc/src/main/ets/pages/mixedPassword.ets index e76d9a3..d6b8474 100644 --- a/product/pc/src/main/ets/pages/mixedPassword.ets +++ b/product/pc/src/main/ets/pages/mixedPassword.ets @@ -13,10 +13,7 @@ * limitations under the License. */ -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 {Log, Trace, styleManager as CommonStyleManager, 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/pc/src/main/ets/vm/indexViewModel.ts b/product/pc/src/main/ets/vm/indexViewModel.ts index 29c0d1e..93ae4b3 100644 --- a/product/pc/src/main/ets/vm/indexViewModel.ts +++ b/product/pc/src/main/ets/vm/indexViewModel.ts @@ -13,9 +13,8 @@ * limitations under the License. */ -import {Log} from '../../../../../../common/src/main/ets/default/Log'; -import ScreenlockStyle, {LockStyleMode -} from '../../../../../../features/screenlock/src/main/ets/com/ohos/model/screenlockStyle' +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' const TAG = 'ScreenLock-IndexViewModel' diff --git a/product/pc/src/main/ets/vm/slideScreenLockViewModel.ts b/product/pc/src/main/ets/vm/slideScreenLockViewModel.ts index 7c0f609..44fff2d 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 '@ohos/common' 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/ServiceExtAbility/ServiceExtAbility.ts b/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts index e867d62..ee7e97c 100644 --- a/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts +++ b/product/phone/src/main/ets/ServiceExtAbility/ServiceExtAbility.ts @@ -16,10 +16,8 @@ import ServiceExtension from '@ohos.app.ability.ServiceExtensionAbility' import windowManager from '@ohos.window' import display from '@ohos.display' -import {Log} from '@ohos/common' +import {Log, AbilityManager, sTimeManager} from '@ohos/common' import Constants from '../../../../../../features/screenlock/src/main/ets/com/ohos/common/constants' -import {AbilityManager} from '@ohos/common' -import sTimeManager from '../../../../../../common/src/main/ets/default/TimeManager' import { UIContext } from '@ohos.arkui.UIContext' const TAG = "ScreenLock-ServiceExtAbility" diff --git a/product/phone/src/main/ets/common/StyleConfiguration.ts b/product/phone/src/main/ets/common/StyleConfiguration.ts index ad3e58a..ddc4eae 100644 --- a/product/phone/src/main/ets/common/StyleConfiguration.ts +++ b/product/phone/src/main/ets/common/StyleConfiguration.ts @@ -13,8 +13,7 @@ * limitations under the License. */ -import StyleManager from '../../../../../../common/src/main/ets/default/StyleManager'; -import {Log} from '@ohos/common' +import {Log, styleManager} from '@ohos/common' const TAG = 'Lock_StatusBar-StyleConfiguration'; @@ -22,7 +21,7 @@ export default class StyleConfiguration { static getIndexStyle() { Log.showInfo(TAG, `setStyle`) const key: string = TAG + "-Index"; - return StyleManager.getStyle(key, () => { + return styleManager.getStyle(key, () => { return {}; }); } diff --git a/product/phone/src/main/ets/common/StyleManager.ts b/product/phone/src/main/ets/common/StyleManager.ts index 53b1815..c2ae363 100644 --- a/product/phone/src/main/ets/common/StyleManager.ts +++ b/product/phone/src/main/ets/common/StyleManager.ts @@ -13,9 +13,7 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import {AbilityManager} from '@ohos/common' -import IndexStyleConfiguration from './StyleConfiguration' +import {Log, AbilityManager} from '@ohos/common' 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 e75f6d3..1e2c11d 100644 --- a/product/phone/src/main/ets/pages/customPassword.ets +++ b/product/phone/src/main/ets/pages/customPassword.ets @@ -13,10 +13,7 @@ * limitations under the License. */ -import {Trace} from '@ohos/common' -import {Log} from '@ohos/common' -import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import {AbilityManager} from '@ohos/common' +import {Log, Trace, styleManager as CommonStyleManager, 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/digitalPassword.ets b/product/phone/src/main/ets/pages/digitalPassword.ets index 1e975a5..b2ad74e 100644 --- a/product/phone/src/main/ets/pages/digitalPassword.ets +++ b/product/phone/src/main/ets/pages/digitalPassword.ets @@ -13,10 +13,7 @@ * limitations under the License. */ -import {Trace} from '@ohos/common' -import {Log} from '@ohos/common' -import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import {AbilityManager} from '@ohos/common' +import {Log, Trace, styleManager as CommonStyleManager, 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 e7a2f68..0d8d3cc 100644 --- a/product/phone/src/main/ets/pages/index.ets +++ b/product/phone/src/main/ets/pages/index.ets @@ -13,10 +13,7 @@ * limitations under the License. */ -import {Log} from '@ohos/common' -import {Trace} from '@ohos/common' -import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import {AbilityManager} from '@ohos/common' +import {Log, Trace, styleManager as CommonStyleManager, 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/mixedPassword.ets b/product/phone/src/main/ets/pages/mixedPassword.ets index 2230912..cc264e8 100644 --- a/product/phone/src/main/ets/pages/mixedPassword.ets +++ b/product/phone/src/main/ets/pages/mixedPassword.ets @@ -13,10 +13,7 @@ * limitations under the License. */ -import {Trace} from '@ohos/common' -import {Log} from '@ohos/common' -import CommonStyleManager from '../../../../../../common/src/main/ets/default/StyleManager' -import {AbilityManager} from '@ohos/common' +import {Log, Trace, styleManager as CommonStyleManager, 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 3213883..65e6b6b 100644 --- a/product/phone/src/main/ets/pages/slidescreenlock.ets +++ b/product/phone/src/main/ets/pages/slidescreenlock.ets @@ -15,7 +15,6 @@ 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' import LockIcon from '../../../../../../features/screenlock/src/main/ets/com/ohos/view/component/lockIcon' import Wallpaper from '../../../../../../features/wallpapercomponent/src/main/ets/com/ohos/view/component/wallpaper'