Skip disabling battery optimizations on ChromeOS

pull/194/merge
M66B 3 years ago
parent 44b5d9120e
commit f7d6dc55a2

@ -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…
Cancel
Save