Small improvement

This commit is contained in:
M66B
2021-07-13 00:34:10 +02:00
parent de843ba57c
commit b6fc9a02d2
2 changed files with 2 additions and 4 deletions

View File

@@ -1081,7 +1081,7 @@ public class Helper {
// https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#configuration_changes
int uiMode = context.getResources().getConfiguration().uiMode;
Log.i("UI mode=0x" + Integer.toHexString(uiMode));
return ((uiMode & Configuration.UI_MODE_NIGHT_YES) != 0);
return ((uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES);
}
static boolean isDarkTheme(Context context) {