diff options
author | Matt Pietal <mpietal@google.com> | 2020-12-01 10:52:28 -0500 |
---|---|---|
committer | Matt Pietal <mpietal@google.com> | 2020-12-01 11:00:58 -0500 |
commit | 60028e89fcd03d22e1e431556686d82c34b06b9c (patch) | |
tree | 3078baba2b01075d2b4c83de860572b48f054dcd /packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java | |
parent | 3a9b54f70487cd139c9c4d1bf740cf30a3564aba (diff) |
AOD - Scale large clock for burn-in protection
Scale the AOD large clock between [0.8, 1.0] in both x,y directions,
in order to keep the clock centered. The large clock will still be
shifted on the y-axis as well.
Bug: 13129102
Test: manual, burn in tests
Change-Id: I86235d39b199a1a10cfb40e474f1e1e58b9c11d8
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java index c0e06e87b753..bc81a198c7e6 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java @@ -193,7 +193,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV /** * Update position of the view with an optional animation */ - public void updatePosition(int x, int y, boolean animate) { + public void updatePosition(int x, int y, float scale, boolean animate) { PropertyAnimator.setProperty(mView, AnimatableProperty.Y, y, CLOCK_ANIMATION_PROPERTIES, animate); @@ -202,10 +202,12 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV PropertyAnimator.setProperty(mView, AnimatableProperty.X, 0, CLOCK_ANIMATION_PROPERTIES, animate); - mKeyguardClockSwitchController.updatePosition(x, CLOCK_ANIMATION_PROPERTIES, animate); + mKeyguardClockSwitchController.updatePosition(x, scale, CLOCK_ANIMATION_PROPERTIES, + animate); } else { // reset any prior movement - mKeyguardClockSwitchController.updatePosition(0, CLOCK_ANIMATION_PROPERTIES, animate); + mKeyguardClockSwitchController.updatePosition(0, 0f, CLOCK_ANIMATION_PROPERTIES, + animate); PropertyAnimator.setProperty(mView, AnimatableProperty.X, x, CLOCK_ANIMATION_PROPERTIES, animate); |