Commit 0772f6dc authored by topjohnwu's avatar topjohnwu

Fix debug channel preference not persisting

parent d3fe3a71
...@@ -172,10 +172,11 @@ object Config : PreferenceModel, DBConfig { ...@@ -172,10 +172,11 @@ object Config : PreferenceModel, DBConfig {
suBiometric = true suBiometric = true
remove(SU_FINGERPRINT) remove(SU_FINGERPRINT)
prefs.getString(Key.UPDATE_CHANNEL, null).also { prefs.getString(Key.UPDATE_CHANNEL, null).also {
if (it == null) if (it == null ||
it.toInt() > Value.DEBUG_CHANNEL ||
it.toInt() < Value.DEFAULT_CHANNEL) {
putString(Key.UPDATE_CHANNEL, defaultChannel.toString()) putString(Key.UPDATE_CHANNEL, defaultChannel.toString())
else if (it.toInt() > Value.CANARY_CHANNEL) }
putString(Key.UPDATE_CHANNEL, Value.CANARY_CHANNEL.toString())
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment