From aad7248b33886291f591b89085b0dc54b66bb6c4 Mon Sep 17 00:00:00 2001 From: Bryce Lee Date: Mon, 16 Aug 2021 16:44:11 -0700 Subject: [PATCH] Do not show keyguard clock when communal mode is active. This changelist hides the clock (part of the KeyguardStatusView) when communal mode is shown on the keyguard. Bug: 196885298 Test: atest KeyguardVisibilityHelperTest Test: atest NotificationPanelViewTest#testKeyguardStatusViewUpdatedWithCommunalPresence Change-Id: I488f51526babb5bc404a1dea1572ed43cd28372c --- .../KeyguardStatusViewController.java | 7 +- .../keyguard/KeyguardVisibilityHelper.java | 12 +++ .../NotificationPanelViewController.java | 32 ++++++++ .../KeyguardQsUserSwitchController.java | 4 +- .../KeyguardUserSwitcherController.java | 4 +- .../KeyguardStatusViewControllerTest.java | 4 + .../KeyguardVisibilityHelperTest.java | 77 +++++++++++++++++++ .../phone/NotificationPanelViewTest.java | 55 ++++++++++++- 8 files changed, 188 insertions(+), 7 deletions(-) create mode 100644 packages/SystemUI/tests/src/com/android/keyguard/KeyguardVisibilityHelperTest.java diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java index 8bf8e09260950..867f1178c3f82 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java @@ -20,6 +20,7 @@ import android.graphics.Rect; import android.util.Slog; import com.android.keyguard.KeyguardClockSwitch.ClockSize; +import com.android.systemui.communal.CommunalStateController; import com.android.systemui.keyguard.KeyguardUnlockAnimationController; import com.android.systemui.shared.system.smartspace.SmartspaceTransitionController; import com.android.systemui.statusbar.notification.AnimatableProperty; @@ -64,6 +65,7 @@ public class KeyguardStatusViewController extends ViewController