From bc3a9267ed68a7d1a9bc9fd894a3ce47c8ef00d3 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Thu, 3 Dec 2020 14:46:41 -0500 Subject: [PATCH] AOD/LS - Fix smartspace/clock collision Make sure layouts don't collide, and works with RTL languages Fixes: 174651917 Test: manual, long calendar notification Change-Id: I4d604194e3b4616c0a82617d3585565d920dc01a --- .../src/com/android/keyguard/KeyguardClockSwitch.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java index 68405a1fca687..2b8ff86bc75f8 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java @@ -156,13 +156,17 @@ public class KeyguardClockSwitch extends RelativeLayout { statusAreaLP.removeRule(RelativeLayout.BELOW); statusAreaLP.addRule(RelativeLayout.ALIGN_PARENT_START); + statusAreaLP.addRule(RelativeLayout.START_OF, R.id.new_lockscreen_clock_view); + statusAreaLP.width = 0; } else { setPaddingRelative(0, 0, 0, 0); mSmallClockFrame.setVisibility(VISIBLE); mNewLockscreenClockFrame.setVisibility(GONE); statusAreaLP.removeRule(RelativeLayout.ALIGN_PARENT_START); + statusAreaLP.removeRule(RelativeLayout.START_OF); statusAreaLP.addRule(RelativeLayout.BELOW, R.id.clock_view); + statusAreaLP.width = ViewGroup.LayoutParams.WRAP_CONTENT; } requestLayout();