mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-02 21:24:34 +00:00
Skip disabling battery optimizations on ChromeOS
This commit is contained in:
parent
44b5d9120e
commit
f7d6dc55a2
2 changed files with 14 additions and 8 deletions
|
@ -677,10 +677,11 @@ public class FragmentSetup extends FragmentBase {
|
|||
btnDoze.setEnabled((ignoring != null && !ignoring) || BuildConfig.DEBUG);
|
||||
}
|
||||
|
||||
tvDozeDone.setText(ignoring == null || ignoring ? R.string.title_setup_done : R.string.title_setup_to_do);
|
||||
tvDozeDone.setTextColor(ignoring == null || ignoring ? textColorPrimary : colorWarning);
|
||||
tvDozeDone.setTypeface(null, ignoring == null || ignoring ? Typeface.NORMAL : Typeface.BOLD);
|
||||
tvDozeDone.setCompoundDrawablesWithIntrinsicBounds(ignoring == null || ignoring ? check : null, null, null, null);
|
||||
boolean done = (ignoring == null || ignoring || Helper.isArc());
|
||||
tvDozeDone.setText(done ? R.string.title_setup_done : R.string.title_setup_to_do);
|
||||
tvDozeDone.setTextColor(done ? textColorPrimary : colorWarning);
|
||||
tvDozeDone.setTypeface(null, done ? Typeface.NORMAL : Typeface.BOLD);
|
||||
tvDozeDone.setCompoundDrawablesWithIntrinsicBounds(done ? check : null, null, null, null);
|
||||
tvDoze12.setVisibility(Helper.isOptimizing12(getContext()) ? View.VISIBLE : View.GONE);
|
||||
|
||||
grpInexactAlarms.setVisibility(
|
||||
|
|
|
@ -1027,6 +1027,15 @@ public class Helper {
|
|||
return "sony".equalsIgnoreCase(Build.MANUFACTURER);
|
||||
}
|
||||
|
||||
static boolean isSurfaceDuo() {
|
||||
return ("Microsoft".equalsIgnoreCase(Build.MANUFACTURER) && "Surface Duo".equals(Build.MODEL));
|
||||
}
|
||||
|
||||
static boolean isArc() {
|
||||
// https://github.com/google/talkback/blob/master/utils/src/main/java/com/google/android/accessibility/utils/FeatureSupport.java
|
||||
return (Build.DEVICE != null) && Build.DEVICE.matches(".+_cheets|cheets_.+");
|
||||
}
|
||||
|
||||
static boolean isStaminaEnabled(Context context) {
|
||||
// https://dontkillmyapp.com/sony
|
||||
if (BuildConfig.DEBUG)
|
||||
|
@ -1044,10 +1053,6 @@ public class Helper {
|
|||
}
|
||||
}
|
||||
|
||||
static boolean isSurfaceDuo() {
|
||||
return ("Microsoft".equalsIgnoreCase(Build.MANUFACTURER) && "Surface Duo".equals(Build.MODEL));
|
||||
}
|
||||
|
||||
static boolean isKilling() {
|
||||
// https://dontkillmyapp.com/
|
||||
return (isSamsung() ||
|
||||
|
|
Loading…
Reference in a new issue