summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
diff options
context:
space:
mode:
authorMatt Pietal <mpietal@google.com>2020-11-03 15:11:20 -0500
committerMatt Pietal <mpietal@google.com>2020-11-04 09:12:50 -0500
commit6a350b53cff91e8b3bc27aa28aaab4d2603d1d84 (patch)
tree9b3dc8d786c276a18fbd988d10c9e126b18c07a5 /packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
parent94b76b2267b20c5e56d4f50c4e259ecf3c984150 (diff)
AOD - Burn in adjustments
Move both the clock and keyguard slice area towards the middle for x adjustments, and retain the current Y adjustments. Bug: 172360102 Test: follow burn in instructions here: /frameworks/base/packages/SystemUI/docs/clock-plugins.md Change-Id: Id22d777724bf9be58758b1a2b260a7933af8e999
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
index cc0d1b651aaf..cc7b8322d190 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
@@ -186,12 +186,23 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
/**
* Update position of the view with an optional animation
*/
- public void updatePosition(int clockTranslationX, int clockTranslationY,
- boolean animateClock) {
- PropertyAnimator.setProperty(mView, AnimatableProperty.X,
- clockTranslationX, CLOCK_ANIMATION_PROPERTIES, animateClock);
- PropertyAnimator.setProperty(mView, AnimatableProperty.Y,
- clockTranslationY, CLOCK_ANIMATION_PROPERTIES, animateClock);
+ public void updatePosition(int x, int y, boolean animate) {
+ PropertyAnimator.setProperty(mView, AnimatableProperty.Y, y, CLOCK_ANIMATION_PROPERTIES,
+ animate);
+
+ if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1) {
+ // reset any prior movement
+ PropertyAnimator.setProperty(mView, AnimatableProperty.X, 0,
+ CLOCK_ANIMATION_PROPERTIES, animate);
+
+ mKeyguardClockSwitchController.updatePosition(x, CLOCK_ANIMATION_PROPERTIES, animate);
+ } else {
+ // reset any prior movement
+ mKeyguardClockSwitchController.updatePosition(0, CLOCK_ANIMATION_PROPERTIES, animate);
+
+ PropertyAnimator.setProperty(mView, AnimatableProperty.X, x,
+ CLOCK_ANIMATION_PROPERTIES, animate);
+ }
}
/**