From 7dd05dc1c7a1589554caa46379f9724f9d0057b3 Mon Sep 17 00:00:00 2001 From: Aran Ink Date: Fri, 31 May 2019 11:47:23 -0400 Subject: [PATCH] Fix marquee animating in QuickSettings when invisible to user. Bug: 127246438 Test: Manual. Change-Id: I8ce23b793821ddf863e4c751129f902f447fde34 --- packages/SystemUI/res/layout/quick_settings_header_info.xml | 1 + .../src/com/android/systemui/qs/QuickStatusBarHeader.java | 5 +++++ .../src/com/android/systemui/util/AutoMarqueeTextView.java | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/packages/SystemUI/res/layout/quick_settings_header_info.xml b/packages/SystemUI/res/layout/quick_settings_header_info.xml index c812489ac0855..683e86728e916 100644 --- a/packages/SystemUI/res/layout/quick_settings_header_info.xml +++ b/packages/SystemUI/res/layout/quick_settings_header_info.xml @@ -21,6 +21,7 @@ android:layout_below="@id/quick_status_bar_system_icons" android:paddingStart="@dimen/status_bar_padding_start" android:paddingEnd="@dimen/status_bar_padding_end" + android:visibility="invisible" android:theme="@style/QSHeaderTheme"> 0) { + mHeaderTextContainerView.setVisibility(VISIBLE); + } else { + mHeaderTextContainerView.setVisibility(INVISIBLE); + } } if (mPrivacyChipAlphaAnimator != null) { mPrivacyChip.setExpanded(expansionFraction > 0.5); diff --git a/packages/SystemUI/src/com/android/systemui/util/AutoMarqueeTextView.java b/packages/SystemUI/src/com/android/systemui/util/AutoMarqueeTextView.java index d9d410dc4b89e..09dbfee5e0a43 100644 --- a/packages/SystemUI/src/com/android/systemui/util/AutoMarqueeTextView.java +++ b/packages/SystemUI/src/com/android/systemui/util/AutoMarqueeTextView.java @@ -48,6 +48,11 @@ public class AutoMarqueeTextView extends TextView { super(context, attrs, defStyleAttr, defStyleRes); } + @Override + protected void onFinishInflate() { + onVisibilityAggregated(isVisibleToUser()); + } + @Override protected void onAttachedToWindow() { super.onAttachedToWindow();