Xiaomi devices don't have a refreshable screen

This commit is contained in:
NekoInverter committed 2021-01-02 23:55:42 +08:00
1 parent db003001c2
commit e840206b77
1 file changed
+2 -3
@@ -300,11 +300,10 @@ public class Settings {
}
if (!sSettingsPre.contains(KEY_E_INK_MODE)) {
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
// Probably an E-Ink device?
if (wm != null) {
Display display = wm.getDefaultDisplay();
// Someone may install EHViewer on a device with no screen?
if (display != null && display.getRefreshRate() < 5.0) {
if (display != null && display.getRefreshRate() > 0 && display.getRefreshRate() < 5.0) {
// Probably an E-Ink device
putReadTheme(2);
putEInkMode(true);
}