mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-20 21:27:07 +00:00
Disable Android 12 doze requirement
This commit is contained in:
parent
30b4314c7c
commit
eb6652ad6a
3 changed files with 4 additions and 11 deletions
8
FAQ.md
8
FAQ.md
|
@ -3926,16 +3926,12 @@ There is no auto discovery for POP3.
|
|||
<a name="faq175"></a>
|
||||
**(175) Why should battery optimizations be disabled?**
|
||||
|
||||
If battery optimizations ([Doze mode](https://developer.android.com/training/monitoring-device-state/doze-standby)) are enabled,
|
||||
If battery optimizations are enabled ([Doze mode](https://developer.android.com/training/monitoring-device-state/doze-standby)),
|
||||
Android might stop the app, which will result in not sending and receiving messages anymore.
|
||||
|
||||
It shouldn't be necessary to disable battery optimizations for Android version 11 or earlier,
|
||||
It shouldn't be necessary to disable battery optimizations,
|
||||
but unfortunately modifications by manufacturers often [require it anyway](https://dontkillmyapp.com/).
|
||||
|
||||
For Android 12 or later, battery optimizations need to be disabled to receive push messages
|
||||
due to [strict foreground restrictions](https://developer.android.com/about/versions/12/foreground-services).
|
||||
If battery optimizations are enabled, the app will periodically check for messages.
|
||||
|
||||
<br />
|
||||
|
||||
<h2><a name="get-support"></a>Get support</h2>
|
||||
|
|
|
@ -196,7 +196,7 @@ public class ApplicationEx extends Application
|
|||
|
||||
DisconnectBlacklist.init(this);
|
||||
|
||||
if (!Helper.isOptimizing12(this)) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
|
||||
ServiceSynchronize.watchdog(this);
|
||||
ServiceSend.watchdog(this);
|
||||
}
|
||||
|
@ -521,9 +521,6 @@ public class ApplicationEx extends Application
|
|||
} else if (version < 1721) {
|
||||
if (!prefs.contains("discard_delete"))
|
||||
editor.putBoolean("discard_delete", false);
|
||||
} else if (version < 1732) {
|
||||
if (Helper.isOptimizing12(context))
|
||||
editor.remove("setup_reminder");
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
|
||||
|
|
|
@ -434,7 +434,7 @@ public class Helper {
|
|||
}
|
||||
|
||||
static boolean isOptimizing12(Context context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S)
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || true)
|
||||
return false;
|
||||
|
||||
Boolean ignoring = Helper.isIgnoringOptimizations(context);
|
||||
|
|
Loading…
Reference in a new issue