mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 01:17:41 +08:00
优化:一换新新机
·还原设置
时保留本机的设备名称
和SIM卡主键/备注
This commit is contained in:
parent
dba756c2f4
commit
a27da6b1d3
@ -153,15 +153,21 @@ class HttpServerUtils private constructor() {
|
|||||||
//还原设置
|
//还原设置
|
||||||
fun restoreSettings(cloneInfo: CloneInfo): Boolean {
|
fun restoreSettings(cloneInfo: CloneInfo): Boolean {
|
||||||
return try {
|
return try {
|
||||||
|
//保留设备名称、SIM卡主键/备注
|
||||||
|
val extraDeviceMark = SettingUtils.extraDeviceMark
|
||||||
|
val subidSim1 = SettingUtils.subidSim1
|
||||||
|
val extraSim1 = SettingUtils.extraSim1
|
||||||
|
val subidSim2 = SettingUtils.subidSim2
|
||||||
|
val extraSim2 = SettingUtils.extraSim2
|
||||||
//应用配置
|
//应用配置
|
||||||
SharedPreference.clearPreference()
|
SharedPreference.clearPreference()
|
||||||
SharedPreference.importPreference(cloneInfo.settings)
|
SharedPreference.importPreference(cloneInfo.settings)
|
||||||
//需要排除的配置
|
//需要排除的配置
|
||||||
SettingUtils.extraDeviceMark = ""
|
SettingUtils.extraDeviceMark = extraDeviceMark
|
||||||
SettingUtils.subidSim1 = 0
|
SettingUtils.subidSim1 = subidSim1
|
||||||
SettingUtils.extraSim1 = ""
|
SettingUtils.extraSim1 = extraSim1
|
||||||
SettingUtils.subidSim2 = 0
|
SettingUtils.subidSim2 = subidSim2
|
||||||
SettingUtils.extraSim2 = ""
|
SettingUtils.extraSim2 = extraSim2
|
||||||
//删除消息与转发日志
|
//删除消息与转发日志
|
||||||
Core.logs.deleteAll()
|
Core.logs.deleteAll()
|
||||||
Core.msg.deleteAll()
|
Core.msg.deleteAll()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user