mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Refactoring: schedule exact alarm
This commit is contained in:
@@ -450,6 +450,9 @@ public class Helper {
|
||||
}
|
||||
|
||||
static Boolean isIgnoringOptimizations(Context context) {
|
||||
if (isArc())
|
||||
return true;
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
|
||||
return null;
|
||||
|
||||
@@ -460,14 +463,6 @@ public class Helper {
|
||||
return pm.isIgnoringBatteryOptimizations(BuildConfig.APPLICATION_ID);
|
||||
}
|
||||
|
||||
static boolean isOptimizing12(Context context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || true)
|
||||
return false;
|
||||
|
||||
Boolean ignoring = Helper.isIgnoringOptimizations(context);
|
||||
return (ignoring != null && !ignoring);
|
||||
}
|
||||
|
||||
static Integer getBatteryLevel(Context context) {
|
||||
try {
|
||||
BatteryManager bm = (BatteryManager) context.getSystemService(Context.BATTERY_SERVICE);
|
||||
@@ -1112,12 +1107,11 @@ public class Helper {
|
||||
// Vivo
|
||||
isRealme() ||
|
||||
isBlackview() ||
|
||||
isSony() ||
|
||||
BuildConfig.DEBUG);
|
||||
isSony());
|
||||
}
|
||||
|
||||
static boolean isDozeRequired() {
|
||||
return (Build.VERSION.SDK_INT > Build.VERSION_CODES.R && false);
|
||||
static boolean isAndroid12() {
|
||||
return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S);
|
||||
}
|
||||
|
||||
static String getUiModeType(Context context) {
|
||||
|
||||
Reference in New Issue
Block a user