From e5ed94019fae3ae45c47db69df1826b23ef8ebbd Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Sat, 9 Mar 2024 19:22:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E7=96=91=E4=BC=BC`R?= =?UTF-8?q?esUtils.getString`=E5=AF=BC=E8=87=B4FC=20#426?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/idormy/sms/forwarder/App.kt | 4 ++-- .../main/java/com/idormy/sms/forwarder/utils/SettingUtils.kt | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/idormy/sms/forwarder/App.kt b/app/src/main/java/com/idormy/sms/forwarder/App.kt index 259f4a2b..b312b812 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/App.kt +++ b/app/src/main/java/com/idormy/sms/forwarder/App.kt @@ -261,13 +261,13 @@ class App : Application(), CactusCallback, Configuration.Provider by Core { Core.init(this) // 配置文件初始化 SharedPreference.init(applicationContext) + // X系列基础库初始化 + XBasicLibInit.init(this) // 初始化日志打印 isDebug = SettingUtils.enableDebugMode Log.init(applicationContext) // 转发历史工具类初始化 HistoryUtils.init(applicationContext) - // X系列基础库初始化 - XBasicLibInit.init(this) // 版本更新初始化 XUpdateInit.init(this) // 运营统计数据 diff --git a/app/src/main/java/com/idormy/sms/forwarder/utils/SettingUtils.kt b/app/src/main/java/com/idormy/sms/forwarder/utils/SettingUtils.kt index d339c9f4..3e21bc48 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/utils/SettingUtils.kt +++ b/app/src/main/java/com/idormy/sms/forwarder/utils/SettingUtils.kt @@ -1,6 +1,8 @@ package com.idormy.sms.forwarder.utils import android.location.Criteria +import com.idormy.sms.forwarder.R +import com.xuexiang.xutil.resource.ResUtils.getString class SettingUtils private constructor() { companion object { @@ -97,7 +99,7 @@ class SettingUtils private constructor() { var requestTimeout: Int by SharedPreference(SP_REQUEST_TIMEOUT, 10) //通知内容 - var notifyContent: String by SharedPreference(SP_NOTIFY_CONTENT, "") + var notifyContent: String by SharedPreference(SP_NOTIFY_CONTENT, getString(R.string.notification_content)) //设备名称 var extraDeviceMark: String by SharedPreference(SP_EXTRA_DEVICE_MARK, "")