From fd28fc0eb9e78137c6f89c9e121546cda22bfd2c Mon Sep 17 00:00:00 2001 From: DrDisagree Date: Thu, 21 Sep 2023 13:43:17 +0600 Subject: [PATCH] Fix notifications not showing while using depth wallpaper --- .../iconify/xposed/mods/DepthWallpaper.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/java/com/drdisagree/iconify/xposed/mods/DepthWallpaper.java b/app/src/main/java/com/drdisagree/iconify/xposed/mods/DepthWallpaper.java index 024badfb0..31e5b5948 100644 --- a/app/src/main/java/com/drdisagree/iconify/xposed/mods/DepthWallpaper.java +++ b/app/src/main/java/com/drdisagree/iconify/xposed/mods/DepthWallpaper.java @@ -5,6 +5,7 @@ import static com.drdisagree.iconify.config.XPrefs.Xprefs; import static de.robv.android.xposed.XposedBridge.hookAllMethods; import static de.robv.android.xposed.XposedHelpers.findClass; +import static de.robv.android.xposed.XposedHelpers.getObjectField; import android.annotation.SuppressLint; import android.content.Context; @@ -125,6 +126,21 @@ protected void afterHookedMethod(MethodHookParam param) { updateWallpaper(); } }); + + Class NotificationPanelViewControllerClass = findClass(SYSTEMUI_PACKAGE + ".shade.NotificationPanelViewController", lpparam.classLoader); + + hookAllMethods(NotificationPanelViewControllerClass, "onFinishInflate", new XC_MethodHook() { + @Override + protected void afterHookedMethod(MethodHookParam param) { + if (!showDepthWallpaper) return; + + View mView = (View) getObjectField(param.thisObject, "mView"); + View keyguardBottomArea = mView.findViewById(mContext.getResources().getIdentifier("keyguard_bottom_area", "id", mContext.getPackageName())); + ViewGroup parent = (ViewGroup) keyguardBottomArea.getParent(); + parent.removeView(keyguardBottomArea); + parent.addView(keyguardBottomArea, 0); + } + }); } private void updateWallpaper() {