Skip to content

Commit

Permalink
Battery Style Manager: Fix for Proton Plus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmud0808 committed Oct 5, 2023
1 parent 4b0bee2 commit 9d0da00
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@ protected Object replaceHookedMethod(MethodHookParam methodHookParam) {
return null;
}
});
} catch (Throwable ignored) {
}

try {
hookAllMethods(BatteryMeterViewClass, "updateBatteryStyle", new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam methodHookParam) {
Expand All @@ -485,6 +488,16 @@ protected Object replaceHookedMethod(MethodHookParam methodHookParam) {
});
} catch (Throwable ignored) {
}

try {
hookAllMethods(BatteryMeterViewClass, "updateDrawable", new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam methodHookParam) {
return null;
}
});
} catch (Throwable ignored) {
}
}

setCustomBatteryDimens();
Expand Down

0 comments on commit 9d0da00

Please sign in to comment.