From 741c6e367d36c52fd3456bcc1547f72f4c9f3833 Mon Sep 17 00:00:00 2001 From: Beverly Date: Mon, 16 Nov 2020 15:07:42 -0500 Subject: [PATCH] Update spacing/layout of LS clock - Only use the burn-in offsets on AOD. This means the clock will be in a different position on LS compared to AOD. - Align the top of the KeyguardSliceView (smart space) with the top of the text of the clock (as opposed dto the top of the clock's view) - Decrease bottom padding on KeyguardSliceTextView so that the DND icon doesn't get cutoff when there's a large smart space info Test: atest SystemUITests, manual Bug: 170228350 Change-Id: I332300616e4218b6fcd24f837127a7eee487d4e7 --- .../res-keyguard/layout/keyguard_clock_switch.xml | 4 +--- .../android/keyguard/AnimatableClockController.java | 7 +++++++ .../src/com/android/keyguard/KeyguardClockSwitch.java | 5 +++++ .../keyguard/KeyguardClockSwitchController.java | 9 +++++++++ .../src/com/android/keyguard/KeyguardSliceView.java | 11 +++-------- .../android/keyguard/KeyguardSliceViewController.java | 7 +++++++ .../keyguard/KeyguardStatusViewController.java | 9 +++++++++ .../phone/KeyguardClockPositionAlgorithm.java | 5 ++--- .../phone/NotificationPanelViewController.java | 9 +++++++-- 9 files changed, 50 insertions(+), 16 deletions(-) diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml index d339ae9920b4b..7816d6252267e 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml @@ -67,20 +67,18 @@ android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentTop="true" - android:layout_marginBottom="24dp" android:visibility="gone"> diff --git a/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java b/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java index 692e40124da97..3157a5a8fc5b5 100644 --- a/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +++ b/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java @@ -17,6 +17,8 @@ package com.android.keyguard; import android.graphics.Color; +import android.graphics.Paint; +import android.util.MathUtils; import com.android.settingslib.Utils; import com.android.systemui.plugins.statusbar.StatusBarStateController; @@ -54,6 +56,11 @@ public class AnimatableClockController extends ViewController