Skip to content

Commit

Permalink
一点调整
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX committed Jan 1, 2024
1 parent e66526b commit 71a25c0
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions app/src/main/java/com/hchen/clipboardlist/unlockIme/UnlockIme.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ private void startHook(LoadPackageParam param) {
protected void after(MethodHookParam param) {
getSupportIme((ClassLoader) param.args[0]);
hookDeleteNotSupportIme("com.miui.inputmethod.InputMethodBottomManager$MiuiSwitchInputMethodListener", (ClassLoader) param.args[0]);
Class<?> InputMethodBottomManager = findClassIfExists("com.miui.inputmethod.InputMethodBottomManager", (ClassLoader) param.args[0]);
if (InputMethodBottomManager != null) {
if (finalIsNonCustomize) {
if (finalIsNonCustomize) {
Class<?> InputMethodBottomManager = findClassIfExists("com.miui.inputmethod.InputMethodBottomManager", (ClassLoader) param.args[0]);
if (InputMethodBottomManager != null) {
hookSIsImeSupport(InputMethodBottomManager);
hookIsXiaoAiEnable(InputMethodBottomManager);
} else {
logE(tag, "Class not found: com.miui.inputmethod.InputMethodBottomManager");
}
} else {
logE(tag, "Class not found: com.miui.inputmethod.InputMethodBottomManager");
}
}
}
Expand Down Expand Up @@ -126,7 +126,7 @@ protected void after(MethodHookParam param) {
}
);
} catch (Throwable throwable) {
logE(tag, "Failed to set the color of the MiuiBottomView: " + throwable);
logE(tag, "Set the color of the MiuiBottomView: " + throwable);
}
}

Expand All @@ -136,9 +136,13 @@ protected void after(MethodHookParam param) {
* @param clazz 声明或继承字段的类
*/
private void customizeBottomViewColor(Class<?> clazz) {
if (navBarColor != 0) {
int color = -0x1 - navBarColor;
callStaticMethod(clazz, "customizeBottomViewColor", true, navBarColor, color | -0x1000000, color | 0x66000000);
try {
if (navBarColor != 0) {
int color = -0x1 - navBarColor;
callStaticMethod(clazz, "customizeBottomViewColor", true, navBarColor, color | -0x1000000, color | 0x66000000);
}
} catch (Throwable e) {
logE(tag, "Call customizeBottomViewColor: " + e);
}
}

Expand Down

0 comments on commit 71a25c0

Please sign in to comment.