Skip to content

Commit

Permalink
Improve BatteryStyleManager
Browse files Browse the repository at this point in the history
  • Loading branch information
DHD2280 committed Apr 25, 2024
1 parent 6eabf7d commit d5ee867
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,26 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
singleToneColor = (int) param.args[0];
frameColor = (int) param.args[1];
backgroundColor = (int) param.args[2];
if (mBatteryIcon != null) {
if (mBatteryIcon.getDrawable() instanceof BatteryDrawable mBatteryDrawable) {
mBatteryDrawable.setColors(frameColor, backgroundColor, singleToneColor);
mBatteryDrawable.customizeBatteryDrawable(
mBatteryLayoutReverse,
mScaledPerimeterAlpha,
mScaledFillAlpha,
mCustomBlendColor,
mRainbowFillColor,
mCustomFillColor,
mCustomFillGradColor,
mCustomBlendColor ? mCustomChargingColor : getChargingColor(mCustomChargingColor),
mCustomBlendColor ? mCustomFastChargingColor : getChargingColor(mCustomFastChargingColor),
mCustomPowerSaveColor,
mCustomPowerSaveFillColor,
mChargingIconSwitch
);
mBatteryIcon.setImageDrawable(mBatteryDrawable);
}
}
}
});

Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values/ic_launcher_background.xml

This file was deleted.

0 comments on commit d5ee867

Please sign in to comment.