Skip to content

Commit

Permalink
Update dependencies (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX authored Jun 19, 2024
1 parent 771b65b commit 5f95af7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
/*
* This file is part of HyperCeiler.
* This file is part of HyperCeiler.
* HyperCeiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License.
* HyperCeiler is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* Copyright (C) 2023-2024 HyperCeiler Contributions
*/
* Copyright (C) 2023-2024 HyperCeiler Contributions
*/
package com.sevtinge.hyperceiler.module.base;

import com.hchen.hooktool.HCHook;
import com.hchen.hooktool.tool.ClassTool;
import com.hchen.hooktool.tool.DexkitTool;
import com.hchen.hooktool.tool.ExpandTool;
import com.hchen.hooktool.tool.FieldTool;
import com.hchen.hooktool.tool.MethodTool;

public abstract class BaseTool extends BaseHook {
public static HCHook hcHook;
public static ClassTool classTool;
public static MethodTool methodTool;
public static FieldTool fieldTool;
public static DexkitTool dexkitTool;
public static ExpandTool expandTool;
public HCHook hcHook;
public ClassTool classTool;
public MethodTool methodTool;
public FieldTool fieldTool;
public ExpandTool expandTool;

public abstract void doHook();

@Override
public void init() {
BaseTool.hcHook = new HCHook();
BaseTool.classTool = hcHook.classTool();
BaseTool.methodTool = hcHook.methodTool();
BaseTool.fieldTool = hcHook.fieldTool();
BaseTool.dexkitTool = hcHook.dexkitTool();
BaseTool.expandTool = hcHook.expandTool();
BaseTool.hcHook.setThisTag(TAG);
hcHook = new HCHook();
classTool = hcHook.classTool();
methodTool = hcHook.methodTool();
fieldTool = hcHook.fieldTool();
expandTool = hcHook.expandTool();
hcHook.setThisTag(TAG);
doHook();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ private static ArrayList<DexKitData> getCacheMapOrReadFile(String dexFile) {
ArrayList<DexKitData> dataList = gson.fromJson(FileUtils.read(dexFile),
new TypeToken<ArrayList<DexKitData>>() {
}.getType());
if (dataList == null)
return new ArrayList<>();
cacheMap.put(dexFile, dataList);
cacheData = dataList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class UnPrivacyWatermark extends BaseTool {

@Override
public void doHook() {
if (classTool.findClassIfExists("com.miui.gallery.editor.photo.app.PrivacyWatermarkActivity")) {
if (expandTool.findClassIfExists("com.miui.gallery.editor.photo.app.PrivacyWatermarkActivity")) {
classTool.findClass("pwa", "com.miui.gallery.editor.photo.app.PrivacyWatermarkActivity")
.getMethod("setWordMaxLength", int.class)
.hook(new IAction() {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
agp = "8.5.0"
hooktool = "v.0.9.0"
hooktool = "v.0.9.6.5"
kotlinAndroid = "2.0.0"
lsparanoid = "0.6.0"
#lspluginResopt = "1.6"
Expand Down

0 comments on commit 5f95af7

Please sign in to comment.