Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

build(deps): bump com.github.HChenX:HookTool from v.1.0.9 to v.1.1.0 in the maven-dependencies group #1041

Merged
merged 2 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public void init() {
hookMethod(Application.class, "attach", Context.class, new IHook() {
@Override
public void before() {
callBackBefore(this, getArgs(0));
callBackBefore(this, (Context) getArgs(0));
}

@Override
public void after() {
callBackAfter(this, getArgs(0));
callBackAfter(this, (Context) getArgs(0));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ public void drawWatermark(Canvas canvas, String text, int mWidth, int mHeight, i
}
float min = Math.min(mWidth, mHeight) * 0.02037037f;
float f2 = 7.0f * min;
Paint initialPaint = is ? callStaticMethod(
Paint initialPaint = (Paint) (is ? callStaticMethod(
"com.miui.gallery.editor.photo.app.privacy.PrivacyWatermarkHelper",
"getInitialPaint"
) : callStaticMethod(
"com.miui.gallery.privacywatermark.PrivacyWatermarkHelper",
"getInitialPaint"
);
));
Rect rect = new Rect();
initialPaint.setTextSize(min);
initialPaint.getTextBounds(text, 0, text.length(), rect);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import static com.hchen.hooktool.tool.CoreTool.getStaticField;
import static com.sevtinge.hyperceiler.utils.Helpers.getPackageVersionCode;
import static de.robv.android.xposed.XposedHelpers.getObjectField;
import static de.robv.android.xposed.XposedHelpers.setStaticIntField;

import android.annotation.SuppressLint;
import android.content.ClipData;
Expand Down Expand Up @@ -49,7 +47,6 @@
import java.nio.file.Paths;
import java.nio.file.attribute.PosixFilePermission;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import de.robv.android.xposed.XposedHelpers;
Expand Down Expand Up @@ -292,7 +289,7 @@ protected void before(MethodHookParam param) throws Throwable {
@Override
protected void before(MethodHookParam param) throws Throwable {
if (mMax == -1)
mMax = getStaticField("com.miui.inputmethod.MiuiClipboardManager", classLoader,
mMax = (int) getStaticField("com.miui.inputmethod.MiuiClipboardManager", classLoader,
"MAX_CLIP_CONTENT_SIZE");
if (mMax == -1) mMax = 5000;
String string = (String) param.args[0];
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dexkit = "2.0.2"
ezxhelper = "2.2.0"
hiddenapibypass = "4.3"
annotation-processor = "4.4.0"
hooktool = "v.1.0.9"
hooktool = "v.1.1.0"
lyricGetterApi = "6.0.0"
mmkv = "2.0.1"

Expand Down
Loading