Skip to content

Commit

Permalink
fix: 磁贴自动收起在 OS2 上失效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
YunZiA authored and lingqiqi5211 committed Jan 12, 2025
1 parent a0b840e commit fdcc646
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package com.sevtinge.hyperceiler.module.hook.systemui;

import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreHyperOSVersion;

import android.view.View;

import com.sevtinge.hyperceiler.module.base.BaseHook;
Expand All @@ -27,7 +29,7 @@
public class AutoCollapse extends BaseHook {
@Override
public void init() {
findAndHookMethod("com.android.systemui.qs.tileimpl.QSTileImpl", lpparam.classLoader, "click", View.class, new MethodHook() {
MethodHook method = new MethodHook() {
@Override
protected void after(MethodHookParam param) {
Object mState = XposedHelpers.callMethod(param.thisObject, "getState");
Expand All @@ -40,6 +42,12 @@ protected void after(MethodHookParam param) {
}
}
}
});
};

if (isMoreHyperOSVersion(2f)) {
findAndHookMethod("com.android.systemui.qs.tileimpl.QSTileImpl", lpparam.classLoader, "click","com.android.systemui.animation.Expandable", method);
} else {
findAndHookMethod("com.android.systemui.qs.tileimpl.QSTileImpl", lpparam.classLoader, "click", View.class, method);
}
}
}

0 comments on commit fdcc646

Please sign in to comment.