am a4ff5b00: am dbd85a70: am a0d28225: am ef390443: am a312f7f8: Fix battery-history-chart large-mode labels in RTL layouts.

* commit 'a4ff5b00c38ebe5a4dec019d204c71b1c8833276':
  Fix battery-history-chart large-mode labels in RTL layouts.
This commit is contained in:
John Spurlock
2014-10-14 17:30:40 +00:00
committed by Android Git Automerger

View File

@@ -1273,6 +1273,8 @@ public class BatteryHistoryChart extends View {
if (mLargeMode) {
if (DEBUG) Log.d(TAG, "Drawing large mode labels");
Paint.Align align = mTextPaint.getTextAlign();
mTextPaint.setTextAlign(textAlignLeft); // large-mode labels always aligned to start
if (mHavePhoneSignal) {
canvas.drawText(mPhoneSignalLabel, textStartX,
height - mPhoneSignalOffset - mTextDescent, mTextPaint);
@@ -1291,6 +1293,7 @@ public class BatteryHistoryChart extends View {
height - mChargingOffset - mTextDescent, mTextPaint);
canvas.drawText(mScreenOnLabel, textStartX,
height - mScreenOnOffset - mTextDescent, mTextPaint);
mTextPaint.setTextAlign(align);
}
canvas.drawLine(mLevelLeft-mThinLineWidth, mLevelTop, mLevelLeft-mThinLineWidth,