From 56bdf23de8b8e55dad19331d00a4f57130780eb5 Mon Sep 17 00:00:00 2001 From: Austin Wang Date: Thu, 22 Apr 2021 17:27:30 +0800 Subject: [PATCH] Add dock_info_bottom_area_overlay Add and overlay near keyguard_bottom_are to host the promo animation. Bug: 182220090 Bug: 178998477 Test: atest SystemUITests:KeyguardBottomAreaTest Test: atestSystemUITests:DockIndicationControllerTest Change-Id: I93a3ddee3f4dc3273ba446dab6f9df49c262e955 --- .../layout/dock_info_bottom_area_overlay.xml | 19 +++++++++++++++++++ .../res/layout/status_bar_expanded.xml | 2 ++ .../KeyguardIndicationController.java | 8 ++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 packages/SystemUI/res/layout/dock_info_bottom_area_overlay.xml diff --git a/packages/SystemUI/res/layout/dock_info_bottom_area_overlay.xml b/packages/SystemUI/res/layout/dock_info_bottom_area_overlay.xml new file mode 100644 index 0000000000000..8b70dd7824076 --- /dev/null +++ b/packages/SystemUI/res/layout/dock_info_bottom_area_overlay.xml @@ -0,0 +1,19 @@ + + + + + diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml index 46a698a092e38..496813d7c333b 100644 --- a/packages/SystemUI/res/layout/status_bar_expanded.xml +++ b/packages/SystemUI/res/layout/status_bar_expanded.xml @@ -101,6 +101,8 @@ + + diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index c1eaaaf92d521..539f36b37c084 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -492,8 +492,12 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal return UserHandle.USER_NULL; } - @VisibleForTesting - protected void setVisible(boolean visible) { + /** + * Sets the visibility of keyguard bottom area, and if the indications are updatable. + * + * @param visible true to make the area visible and update the indication, false otherwise. + */ + public void setVisible(boolean visible) { mVisible = visible; mIndicationArea.setVisibility(visible ? VISIBLE : GONE); if (visible) {