Signed-off-by: 18671941053 <zoujunjie6@huawei.com>
This commit is contained in:
18671941053 2024-08-12 14:57:00 +08:00
parent 175dc8f023
commit 4800ad0469
127 changed files with 367 additions and 231 deletions

View File

@ -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'

71
common/index.ts Normal file
View File

@ -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'

View File

@ -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": {}

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
export default class CheckEmptyUtils {
export class CheckEmptyUtils {
/**
* Check obj is empty.

View File

@ -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 {

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
import Log from "./Log";
import {Log} from "./Log";
const TAG = "Decorators";

View File

@ -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.
*

View File

@ -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';

View File

@ -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 {

View File

@ -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";

View File

@ -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<T>(objectClass: { new(): T }, storageKey: string): T {
export function createOrGet<T>(objectClass: { new(): T }, storageKey: string): T {
if (!globalThis[storageKey]) {
globalThis[storageKey] = new objectClass();
Log.showDebug(TAG, `Create key of ${storageKey}`);

View File

@ -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, () => {

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
import Log from './Log';
import { Log } from './Log';
const TAG = 'Common-StyleManager';

View File

@ -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<UserChangeListener>();
mHasWait: boolean = false;
static getInstance(): SwitchUserManager {
return getSingleInstance(SwitchUserManager, TAG);
return createOrGet(SwitchUserManager, TAG);
}
constructor() {

View File

@ -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;

View File

@ -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";

View File

@ -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';

View File

@ -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)

View File

@ -0,0 +1,5 @@
export { AbilityManager } from './abilityManager'
export { BundleManager } from './bundleManager'
export { NotificationManager } from './notificationManager'

View File

@ -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);
}

View File

@ -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 = {

View File

@ -0,0 +1,6 @@
export { CommonEventManager } from './CommonEventManager'
export { getCommonEventManager } from './CommonEventManager'
export { POLICY } from './CommonEventManager'

View File

@ -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";

View File

@ -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<string>;
eventParser: EventParser;
mContext: ServiceExtensionContext | undefined;

View File

@ -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 = {

View File

@ -0,0 +1,7 @@
export { EventManager } from './EventManager'
export { unsubscribe } from './EventManager'
export { obtainLocalEvent } from './EventUtil'
export { obtainStartAbility } from './EventUtil'

View File

@ -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'

View File

@ -5,5 +5,7 @@
"description": "example description",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../common"
}
}

View File

@ -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";

View File

@ -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";

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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;

View File

@ -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';

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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";

View File

@ -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';

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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';

View File

@ -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'

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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';

View File

@ -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';

View File

@ -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'

View File

@ -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';

View File

@ -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

View File

@ -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';

View File

@ -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`;

View File

@ -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';

View File

@ -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';

View File

@ -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'

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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"

View File

@ -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'

View File

@ -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';

View File

@ -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";

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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"

View File

@ -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';

View File

@ -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'

View File

@ -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';

View File

@ -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';

View File

@ -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'

View File

@ -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';

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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'

View File

@ -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'

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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";

View File

@ -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'

View File

@ -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';

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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'

View File

@ -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'

View File

@ -7,5 +7,7 @@
"main": "index.ets",
"repository": {},
"version": "1.0.0",
"dependencies": {}
"dependencies": {
"@ohos/common": "../../common"
}
}

View File

@ -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 {

View File

@ -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'

Some files were not shown because too many files have changed in this diff Show More