diff --git a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/HeaderImage.java b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/HeaderImage.java index 6de2aa375..94b22fe3e 100644 --- a/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/HeaderImage.java +++ b/app/src/main/java/it/dhd/oxygencustomizer/xposed/hooks/systemui/statusbar/HeaderImage.java @@ -200,10 +200,14 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { if (mQsHeaderLayout == null) return; int alphaIndex = param.args[2] instanceof Float ? 2 : 1; - if (findField(ScrimControllerClass, "mScrimBehind").get(param.thisObject).equals(param.args[0])) { + log(TAG + "ScrimControllerClass updateScrimColor " + ((float) param.args[alphaIndex])); float qsAlpha = (float) param.args[alphaIndex]; - if (qsAlpha < .19f) { + boolean nightMode = (mQsHeaderLayout.getContext().getResources().getConfiguration().uiMode + & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; + if (nightMode && qsAlpha < .19f // Dark Mode Alpha + || !nightMode && qsAlpha < 0.09f // Light Mode Different Alpha + ) { mQsHeaderLayout.setAlpha(0f); } else { mQsHeaderLayout.setAlpha(1f);