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