From 92465ebe10a56f577ca0676cb977b80d4c1ed250 Mon Sep 17 00:00:00 2001 From: Hawkwood Glazier Date: Mon, 10 Apr 2023 23:39:52 +0000 Subject: [PATCH] Adjust WeatherDate view to be INVISIBLE instead of GONE This keeps the position of smartspace the same on LS when it is visible. Bug: 277583395 Test: Manually check smartspace positioning Change-Id: I6dd451ed1518df270fa6f4115b51564b8bb503f2 --- .../src/com/android/keyguard/KeyguardClockSwitchController.java | 2 +- .../com/android/keyguard/KeyguardClockSwitchControllerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java index 25d17928351a7..a42a9b79e596f 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java @@ -493,7 +493,7 @@ public class KeyguardClockSwitchController extends ViewController { mDateWeatherView.setVisibility( - clockHasCustomWeatherDataDisplay() ? View.GONE : View.VISIBLE); + clockHasCustomWeatherDataDisplay() ? View.INVISIBLE : View.VISIBLE); }); } } diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java index b9f8dd9452937..fc906dedfa1db 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java @@ -391,7 +391,7 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase { listenerArgumentCaptor.getValue().onCurrentClockChanged(); mExecutor.runAllReady(); - assertEquals(View.GONE, mFakeDateView.getVisibility()); + assertEquals(View.INVISIBLE, mFakeDateView.getVisibility()); } @Test