diff options
author | John Spurlock <jspurlock@google.com> | 2013-09-17 11:03:03 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2013-09-17 11:03:03 -0400 |
commit | d19877f8a3557702d87bc9ed8c4be947e947b8b7 (patch) | |
tree | c8b91819f7cdb6260902291909d923c9e5e96995 /packages | |
parent | fd111c8f61b006e66a6670cbf4e1c579000ba3e3 (diff) | |
download | frameworks_base-d19877f8a3557702d87bc9ed8c4be947e947b8b7.zip frameworks_base-d19877f8a3557702d87bc9ed8c4be947e947b8b7.tar.gz frameworks_base-d19877f8a3557702d87bc9ed8c4be947e947b8b7.tar.bz2 |
BatteryMeterView: Charging trumps empty.
Match the style implicit in the battery assets: if charging,
show the bolt, not the exclamation point.
Bug:10651062
Change-Id: I3edd822326ad611972e791cf4acc8c395e51a74d
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/SystemUI/src/com/android/systemui/BatteryMeterView.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java index 2257617..2be8ee5 100755 --- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java @@ -292,11 +292,7 @@ public class BatteryMeterView extends View implements DemoMode { c.drawRect(mFrame, mBatteryPaint); c.restore(); - if (level <= EMPTY) { - final float x = mWidth * 0.5f; - final float y = (mHeight + mWarningTextHeight) * 0.48f; - c.drawText(mWarningString, x, y, mWarningTextPaint); - } else if (tracker.plugged) { + if (tracker.plugged) { // draw the bolt final int bl = (int)(mFrame.left + width / 4f); final int bt = (int)(mFrame.top + height / 6f); @@ -319,6 +315,10 @@ public class BatteryMeterView extends View implements DemoMode { mBoltFrame.top + mBoltPoints[1] * mBoltFrame.height()); } c.drawPath(mBoltPath, mBoltPaint); + } else if (level <= EMPTY) { + final float x = mWidth * 0.5f; + final float y = (mHeight + mWarningTextHeight) * 0.48f; + c.drawText(mWarningString, x, y, mWarningTextPaint); } else if (mShowPercent && !(tracker.level == 100 && !SHOW_100_PERCENT)) { mTextPaint.setTextSize(height * (SINGLE_DIGIT_PERCENT ? 0.75f |