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

Commit 19e3e2ad authored by Robert Snoeberger's avatar Robert Snoeberger
Browse files

Make pixel shifting of custom clocks consistent with default

Bug: 122301289
Test: atest frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/clock/
Change-Id: I503d05a67c4b6a1fdcd188ade20d19b801c8700f
parent 516218f9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -76,8 +76,10 @@ public class ClockLayout extends FrameLayout {
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);

        final float offsetX = getBurnInOffset(mBurnInPreventionOffsetX, true);
        final float offsetY = getBurnInOffset(mBurnInPreventionOffsetY, false);
        final float offsetX = getBurnInOffset(mBurnInPreventionOffsetX * 2, true)
                - mBurnInPreventionOffsetX;
        final float offsetY = getBurnInOffset(mBurnInPreventionOffsetY * 2, false)
                - mBurnInPreventionOffsetY;

        // Put digital clock in two left corner of the screen.
        if (mDigitalClock != null) {