mirror of
https://gitee.com/openharmony/applications_settings
synced 2024-11-27 08:30:34 +00:00
commit
9b4abb8091
@ -18,12 +18,20 @@ import account_osAccount from '@ohos.account.osAccount';
|
||||
import featureAbility from '@ohos.ability.featureAbility';
|
||||
import LogUtil from '../../../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil';
|
||||
import GlobalResourceManager from '../../../../../../../../common/utils/src/main/ets/default/baseUtil/GlobalResourceManager';
|
||||
import {TYPE_ADMIN, TYPE_NORMAL, TYPE_GUEST, MAX_ACCOUNT} from './systemAccountModel'
|
||||
import SystemAccountModel from './systemAccountModel'
|
||||
import {TYPE_ADMIN, TYPE_NORMAL, TYPE_GUEST, MAX_ACCOUNT} from './systemAccountModel';
|
||||
import SystemAccountModel from './systemAccountModel';
|
||||
|
||||
export class SystemAccountController {
|
||||
private currentAccount: account_osAccount.OsAccountInfo;
|
||||
private accountList: account_osAccount.OsAccountInfo[] = [];
|
||||
private static instance: SystemAccountController;
|
||||
|
||||
public static getInstance(): SystemAccountController {
|
||||
if (!SystemAccountController.instance) {
|
||||
SystemAccountController.instance = new SystemAccountController();
|
||||
}
|
||||
return SystemAccountController.instance;
|
||||
}
|
||||
|
||||
constructor() {
|
||||
}
|
||||
@ -233,5 +241,5 @@ export class SystemAccountController {
|
||||
}
|
||||
}
|
||||
|
||||
let systemAccountController = new SystemAccountController();
|
||||
let systemAccountController = SystemAccountController.getInstance();
|
||||
export default systemAccountController as SystemAccountController;
|
||||
|
@ -157,7 +157,6 @@ struct Index {
|
||||
|
||||
onBackPress() {
|
||||
LogUtil.info(ConfigData.TAG + 'settings get device onBackPress in');
|
||||
Navigator().active(true);
|
||||
LogUtil.info(ConfigData.TAG + 'settings get device onBackPress out');
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ struct MultipleUsers {
|
||||
LogUtil.info("Cancel dialog.")
|
||||
}
|
||||
})
|
||||
})).bind(this);
|
||||
}));
|
||||
}
|
||||
aboutToAppear(): void {
|
||||
if (deviceTypeInfo === 'phone') {
|
||||
|
Loading…
Reference in New Issue
Block a user