Loading packages/SystemUI/src/com/android/keyguard/clock/SmallClockPosition.java +2 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,8 @@ class SmallClockPosition { */ int getPreferredY() { // On AOD, clock needs to appear below the status bar with enough room for pixel shifting int aodY = mStatusBarHeight + mKeyguardLockPadding + mBurnInOffsetY; int aodY = mStatusBarHeight + mKeyguardLockHeight + 2 * mKeyguardLockPadding + mBurnInOffsetY; // On lock screen, clock needs to appear below the lock icon int lockY = mStatusBarHeight + mKeyguardLockHeight + 2 * mKeyguardLockPadding; return (int) MathUtils.lerp(lockY, aodY, mDarkAmount); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +2 −2 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ public class KeyguardClockPositionAlgorithm { } private int getExpandedPreferredClockY() { return (mHasCustomClock && !mHasVisibleNotifs) ? getPreferredClockY() return (mHasCustomClock && (!mHasVisibleNotifs || mPositionLikeDark)) ? getPreferredClockY() : getExpandedClockPosition(); } Loading Loading @@ -218,7 +218,7 @@ public class KeyguardClockPositionAlgorithm { float clockY = MathUtils.lerp(clockYBouncer, clockYRegular, shadeExpansion); clockYDark = MathUtils.lerp(clockYBouncer, clockYDark, shadeExpansion); float darkAmount = mPositionLikeDark ? 1.0f : mDarkAmount; float darkAmount = mPositionLikeDark && !mHasCustomClock ? 1.0f : mDarkAmount; return (int) (MathUtils.lerp(clockY, clockYDark, darkAmount) + mEmptyDragAmount); } Loading packages/SystemUI/tests/src/com/android/keyguard/clock/SmallClockPositionTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -52,8 +52,8 @@ class SmallClockPositionTest : SysuiTestCase() { fun darkPosition() { // GIVEN on AOD position.setDarkAmount(1f) // THEN Y position is statusBarHeight + lockPadding + burnInY (100 + 15 + 20 = 135) assertThat(position.preferredY).isEqualTo(135) // THEN Y is sum of statusBarHeight, lockPadding, lockHeight, lockPadding, burnInY assertThat(position.preferredY).isEqualTo(185) } @Test Loading Loading
packages/SystemUI/src/com/android/keyguard/clock/SmallClockPosition.java +2 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,8 @@ class SmallClockPosition { */ int getPreferredY() { // On AOD, clock needs to appear below the status bar with enough room for pixel shifting int aodY = mStatusBarHeight + mKeyguardLockPadding + mBurnInOffsetY; int aodY = mStatusBarHeight + mKeyguardLockHeight + 2 * mKeyguardLockPadding + mBurnInOffsetY; // On lock screen, clock needs to appear below the lock icon int lockY = mStatusBarHeight + mKeyguardLockHeight + 2 * mKeyguardLockPadding; return (int) MathUtils.lerp(lockY, aodY, mDarkAmount); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +2 −2 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ public class KeyguardClockPositionAlgorithm { } private int getExpandedPreferredClockY() { return (mHasCustomClock && !mHasVisibleNotifs) ? getPreferredClockY() return (mHasCustomClock && (!mHasVisibleNotifs || mPositionLikeDark)) ? getPreferredClockY() : getExpandedClockPosition(); } Loading Loading @@ -218,7 +218,7 @@ public class KeyguardClockPositionAlgorithm { float clockY = MathUtils.lerp(clockYBouncer, clockYRegular, shadeExpansion); clockYDark = MathUtils.lerp(clockYBouncer, clockYDark, shadeExpansion); float darkAmount = mPositionLikeDark ? 1.0f : mDarkAmount; float darkAmount = mPositionLikeDark && !mHasCustomClock ? 1.0f : mDarkAmount; return (int) (MathUtils.lerp(clockY, clockYDark, darkAmount) + mEmptyDragAmount); } Loading
packages/SystemUI/tests/src/com/android/keyguard/clock/SmallClockPositionTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -52,8 +52,8 @@ class SmallClockPositionTest : SysuiTestCase() { fun darkPosition() { // GIVEN on AOD position.setDarkAmount(1f) // THEN Y position is statusBarHeight + lockPadding + burnInY (100 + 15 + 20 = 135) assertThat(position.preferredY).isEqualTo(135) // THEN Y is sum of statusBarHeight, lockPadding, lockHeight, lockPadding, burnInY assertThat(position.preferredY).isEqualTo(185) } @Test Loading