Permalink
Browse files

Battery bolt inside the icon: fix visibility when charging

- percentage hidden in the icon: show bolt
- percentage inside the icon and force pct outside when charging: show bolt
- percentage inside the icon and no force pct outside when charging: hide bolt
- percentage always outside the icon: show bolt

Change-Id: I1c15c9fa398e2a2f26f8cf3d8c1db973108a0130
  • Loading branch information...
ezio84 authored and xlxfoxxlx committed Dec 2, 2016
1 parent 09d3436 commit 7a696eff88c964320807e0d7550a0db3933d0b95
Showing with 2 additions and 1 deletion.
  1. +2 −1 packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java
@@ -768,7 +768,8 @@ private void drawBattery(Canvas canvas) {
// happened, we need to change the paint rather than the alpha in case the blendMode
// has been set to clear. Clear always clears regardless of alpha level ;)
final BitmapDrawable bd = (BitmapDrawable) d;
bd.getPaint().set(mPluggedIn && mForceChargeBatteryText ? mTextAndBoltPaint : mClearPaint);
bd.getPaint().set(!mPluggedIn || (mPluggedIn && mShowPercent && !mForceChargeBatteryText)
? mClearPaint : mTextAndBoltPaint);
if (mBoltOverlay) {
mBoltDrawable.setTint(getBoltColor());
}

0 comments on commit 7a696ef

Please sign in to comment.