Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a312f7f8 authored by John Spurlock's avatar John Spurlock
Browse files

Fix battery-history-chart large-mode labels in RTL layouts.

Bug: 17425651
Change-Id: Iae53e111fa3c6bc822821a6a30bd34edb058c1a5
parent 178db4d5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1272,6 +1272,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);
@@ -1290,6 +1292,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,