From 059d6463090c0d465a892affe13afdd57c4cdd6c Mon Sep 17 00:00:00 2001 From: fangzheng24 Date: Wed, 21 Dec 2022 19:16:34 +0800 Subject: [PATCH 1/2] Default_settings_for_adding_mobile Signed-off-by: fangzheng24 --- entry/src/main/ets/Utils/SettingsDBHelper.ets | 3 +++ entry/src/main/ets/Utils/SettingsDataConfig.ets | 2 ++ 2 files changed, 5 insertions(+) diff --git a/entry/src/main/ets/Utils/SettingsDBHelper.ets b/entry/src/main/ets/Utils/SettingsDBHelper.ets index abb259e..61f67e7 100644 --- a/entry/src/main/ets/Utils/SettingsDBHelper.ets +++ b/entry/src/main/ets/Utils/SettingsDBHelper.ets @@ -160,6 +160,9 @@ class SettingsDBHelper { await this.loadSettings(this.rdbStore_, SettingsKey.SETTINGS_DISPALY_NAVBAR_STATUS, defaultKV[DefaultKey.SETTINGS_DISPALY_NAVBAR_STATUS_DEFAULT]); + await this.loadSettings(this.rdbStore_, + SettingsKey.CELLULAR_DATA_ENABLE, defaultKV[DefaultKey.CELLULAR_DATA_ENABLE_DEFAULT]); + Log.I("loadDefaultSettings end"); return; } diff --git a/entry/src/main/ets/Utils/SettingsDataConfig.ets b/entry/src/main/ets/Utils/SettingsDataConfig.ets index e3fc5e0..b658497 100644 --- a/entry/src/main/ets/Utils/SettingsDataConfig.ets +++ b/entry/src/main/ets/Utils/SettingsDataConfig.ets @@ -22,6 +22,7 @@ enum DefaultKey { SETTINGS_AUDIO_VOICE_CALL_DEFAULT = "settings.audio.voicecall.default", 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", }; enum SettingsKey { @@ -32,6 +33,7 @@ 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" }; const SettingsDataConfig = { -- Gitee From b119dbbf0e495dc01783607cf230ea43575bca3c Mon Sep 17 00:00:00 2001 From: fangzheng24 Date: Thu, 22 Dec 2022 17:35:09 +0800 Subject: [PATCH 2/2] Default_settings_for_adding_mobile Signed-off-by: fangzheng24 --- entry/src/main/resources/rawfile/default_settings.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/entry/src/main/resources/rawfile/default_settings.json b/entry/src/main/resources/rawfile/default_settings.json index 9c29f44..b081ec4 100644 --- a/entry/src/main/resources/rawfile/default_settings.json +++ b/entry/src/main/resources/rawfile/default_settings.json @@ -23,6 +23,10 @@ { "name": "settings.display.navigationbar_status.default", "value": "1" + }, + { + "name": "cellular_data_enable.default", + "value": "1" } ] } \ No newline at end of file -- Gitee