蓝区master:刷机或恢复出厂设置后,自动亮度默认开启

Signed-off-by: liminjie10 <liminjie10@huawei.com>
This commit is contained in:
liminjie10 2023-01-04 16:13:58 +08:00
parent 0b787995a8
commit f70d5369e1
3 changed files with 12 additions and 1 deletions

View File

@ -41,6 +41,8 @@ const DefalutKVGlobal = {
"settings.audio.media.default": "5",
"settings.audio.voicecall.default": "5",
"settings.display.navigationbar_status.default": "1",
"cellular_data_enable.default": "1",
"settings.display.auto_screen_brightness.default": "1"
};
const TIME_FORMAT = {
@ -163,6 +165,9 @@ class SettingsDBHelper {
await this.loadSettings(this.rdbStore_,
SettingsKey.CELLULAR_DATA_ENABLE, defaultKV[DefaultKey.CELLULAR_DATA_ENABLE_DEFAULT]);
await this.loadSettings(this.rdbStore_,
SettingsKey.SETTINGS_DISPLAY_AUTO_SCREEN_BRIGHTNESS, defaultKV[DefaultKey.SETTINGS_DISPLAY_AUTO_SCREEN_BRIGHTNESS_DEFAULT]);
Log.I("loadDefaultSettings end");
return;
}

View File

@ -23,6 +23,7 @@ enum DefaultKey {
SETTINGS_GENERAL_DEVICE_NAME_DEFAULT = "settings.general.device_name.default",
SETTINGS_DISPALY_NAVBAR_STATUS_DEFAULT = "settings.display.navigationbar_status.default",
CELLULAR_DATA_ENABLE_DEFAULT = "cellular_data_enable.default",
SETTINGS_DISPLAY_AUTO_SCREEN_BRIGHTNESS_DEFAULT = "settings.display.auto_screen_brightness.default"
};
enum SettingsKey {
@ -33,7 +34,8 @@ enum SettingsKey {
SETTINGS_AUDIO_VOICE_CALL = "settings.audio.voicecall",
SETTINGS_GENERAL_DEVICE_NAME = "settings.general.device_name",
SETTINGS_DISPALY_NAVBAR_STATUS = "settings.display.navigationbar_status",
CELLULAR_DATA_ENABLE = "cellular_data_enable"
CELLULAR_DATA_ENABLE = "cellular_data_enable",
SETTINGS_DISPLAY_AUTO_SCREEN_BRIGHTNESS = "settings.display.auto_screen_brightness"
};
const SettingsDataConfig = {

View File

@ -27,6 +27,10 @@
{
"name": "cellular_data_enable.default",
"value": "1"
},
{
"name": "settings.display.auto_screen_brightness.default",
"value": "1"
}
]
}