MCPcopy Create free account
hub / github.com/M66B/FairEmail / isNight

Method isNight

app/src/main/java/eu/faircode/email/Helper.java:2269–2274  ·  view source on GitHub ↗
(Context context)

Source from the content-addressed store, hash-verified

2267 }
2268
2269 static boolean isNight(Context context) {
2270 // https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#configuration_changes
2271 int uiMode = context.getResources().getConfiguration().uiMode;
2272 Log.i("UI mode=0x" + Integer.toHexString(uiMode));
2273 return ((uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES);
2274 }
2275
2276 static boolean isDarkTheme(Context context) {
2277 // R.attr.isLightTheme

Callers 3

getThemeMethod · 0.95
onCreateMethod · 0.95
getAppInfoMethod · 0.95

Calls 2

iMethod · 0.95
getResourcesMethod · 0.45

Tested by

no test coverage detected