mirror of
https://gitee.com/openharmony/applications_settings_data
synced 2024-11-23 06:40:11 +00:00
settingsdata支持多用户独立配置
Signed-off-by: 侯志雄 <houzhixiong1@h-partners.com>
This commit is contained in:
parent
8a8e392fd5
commit
9de87406d4
@ -72,7 +72,7 @@ class SettingsDBHelper {
|
||||
|
||||
private constructor() {
|
||||
this.rdbStore = undefined;
|
||||
this.context = GlobalContext.thisContext as Context;
|
||||
this.context = GlobalContext.getContext().getObject('abilityContext') as Context;
|
||||
Log.info('context start'+ JSON.stringify(this.context));
|
||||
}
|
||||
|
||||
@ -159,15 +159,14 @@ class SettingsDBHelper {
|
||||
|
||||
public async initRdbStore() {
|
||||
Log.info('call initRdbStore start');
|
||||
let rdbStore = await relationalStore.getRdbStore(
|
||||
this.context as Context, { name: SettingsDataConfig.DB_NAME,securityLevel:1 });
|
||||
let rdbStore = await relationalStore.getRdbStore(this.context as Context, {
|
||||
name: SettingsDataConfig.DB_NAME,
|
||||
securityLevel:1
|
||||
});
|
||||
if(rdbStore){
|
||||
this.rdbStore = rdbStore;
|
||||
}
|
||||
|
||||
|
||||
await this.firstStartupConfig();
|
||||
|
||||
Log.info('call initRdbStore end');
|
||||
return this.rdbStore;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user