From 507fe6f104f7dc094cfebbd63eddf2b6f915983f Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Fri, 11 Jun 2021 17:04:40 -0400 Subject: [PATCH] KeyguardClockPositionAlgorithm Test updates Remove the concept of a 'preferred clock y'... not in use anymore. Existing algo tests were designed around everything being centered on the screen and isn't relevant. Update to reflect everything being top-aligned. Fixes: 190849712 Test: atest KeyguardClockPositionAlgorithmTest Change-Id: I0a5fafb5ec36ffe6f98fdc6a44e46a65c821cc0c --- .../android/keyguard/KeyguardClockSwitch.java | 14 -- .../KeyguardClockSwitchController.java | 10 -- .../KeyguardStatusViewController.java | 10 -- .../phone/KeyguardClockPositionAlgorithm.java | 10 +- .../NotificationPanelViewController.java | 3 +- .../KeyguardClockPositionAlgorithmTest.java | 146 ++++++------------ 6 files changed, 47 insertions(+), 146 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java index 92ffb42d7921e..ef052c4b81ac3 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java @@ -287,20 +287,6 @@ public class KeyguardClockSwitch extends RelativeLayout { return mClockView.getTextSize(); } - /** - * Returns the preferred Y position of the clock. - * - * @param totalHeight Height of the parent container. - * @return preferred Y position. - */ - int getPreferredY(int totalHeight) { - if (mClockPlugin != null) { - return mClockPlugin.getPreferredY(totalHeight); - } else { - return totalHeight / 2; - } - } - /** * Refresh the time of the clock, due to either time tick broadcast or doze time tick alarm. */ diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java index a7239cabcae52..ef6212d4f3547 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java @@ -256,16 +256,6 @@ public class KeyguardClockSwitchController extends ViewController