diff --git a/.github/edit2MakeNewCanary b/.github/edit2MakeNewCanary index 65aeddb0b..04ad0604c 100644 --- a/.github/edit2MakeNewCanary +++ b/.github/edit2MakeNewCanary @@ -1 +1 @@ -Editing this file will trigger the build script for a new canary. \ No newline at end of file +Editing this file will trigger the build script for a new canary.. \ No newline at end of file diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml new file mode 100644 index 000000000..371f2e299 --- /dev/null +++ b/.idea/appInsightsSettings.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/java/sh/siava/pixelxpert/modpacks/systemui/ThemeManager_14.java b/app/src/main/java/sh/siava/pixelxpert/modpacks/systemui/ThemeManager_14.java index fd29e42fe..6cd130512 100644 --- a/app/src/main/java/sh/siava/pixelxpert/modpacks/systemui/ThemeManager_14.java +++ b/app/src/main/java/sh/siava/pixelxpert/modpacks/systemui/ThemeManager_14.java @@ -14,6 +14,7 @@ import static de.robv.android.xposed.XposedHelpers.getObjectField; import static de.robv.android.xposed.XposedHelpers.setObjectField; import static sh.siava.pixelxpert.modpacks.XPrefs.Xprefs; +import static sh.siava.pixelxpert.modpacks.utils.Helpers.dumpClass; import static sh.siava.pixelxpert.modpacks.utils.Helpers.findMethod; import android.annotation.SuppressLint; @@ -194,8 +195,9 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { Class StateFlowImplClass = findClass("kotlinx.coroutines.flow.StateFlowImpl", lpparam.classLoader); Class ReadonlyStateFlowClass = findClass("kotlinx.coroutines.flow.ReadonlyStateFlow", lpparam.classLoader); + dumpClass(ReadonlyStateFlowClass); Object zeroAlphaFlow = StateFlowImplClass.getConstructor(Object.class).newInstance(0f); - setObjectField(param.thisObject, "backgroundAlpha", ReadonlyStateFlowClass.getConstructor(StateFlowImplClass).newInstance(zeroAlphaFlow)); + setObjectField(param.thisObject, "backgroundAlpha", ReadonlyStateFlowClass.getConstructors()[0].newInstance(zeroAlphaFlow)); } }); @@ -334,7 +336,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { } }); - hookAllMethods(BatteryStatusChipClass, findMethod(BatteryStatusChipClass, "updateResources.*").getName(), new XC_MethodHook() { //background color of 14's charging chip. Fix for light QS theme situation + XC_MethodHook updateResourcesHook = new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { if (!isDark) @@ -342,7 +344,11 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { .getBackground() .setTint(colorInactive); } - }); + }; + + hookAllConstructors(BatteryStatusChipClass, updateResourcesHook); + hookAllMethods(BatteryStatusChipClass, "onConfigurationChanged", updateResourcesHook); + hookAllMethods(BrightnessSliderViewClass, "onFinishInflate", new XC_MethodHook() { //brightness slider @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable {