Add: Ignore battery optimization's dialog (to fix crashes on A12+)

This commit is contained in:
machiav3lli
2022-04-10 14:48:32 +02:00
parent 00f6822cc5
commit 57f2944697
4 changed files with 49 additions and 2 deletions

View File

@ -37,7 +37,8 @@ object Preferences {
Key.Theme,
Key.DefaultTab,
Key.UpdateNotify,
Key.UpdateUnstable
Key.UpdateUnstable,
Key.IgnoreIgnoreBatteryOptimization
).map { Pair(it.name, it) }.toMap()
fun init(context: Context) {
@ -178,6 +179,9 @@ object Preferences {
object UpdateNotify : Key<Boolean>("update_notify", Value.BooleanValue(true))
object UpdateUnstable : Key<Boolean>("update_unstable", Value.BooleanValue(false))
object IgnoreIgnoreBatteryOptimization :
Key<Boolean>("ignore_ignore_battery_optimization", Value.BooleanValue(false))
}
sealed class AutoSync(override val valueString: String) : Enumeration<AutoSync> {