From 99119cbc67b268c1104d3e454accad65ee8a92e2 Mon Sep 17 00:00:00 2001 From: Steve Elliott Date: Thu, 13 Aug 2020 13:20:51 -0400 Subject: [PATCH] Re-add notification history tunable Test: manual, atest Change-Id: I9da939e571abe5582c07a3b6cde3e070e19a47f9 --- .../stack/NotificationStackScrollLayout.java | 2 +- .../NotificationStackScrollLayoutController.java | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index d2f8a39cc8fbd..0bcebf9f83dfe 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -3355,8 +3355,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd @ShadeViewRefactor(RefactorComponent.COORDINATOR) void onViewAddedInternal(ExpandableView child) { - child.setOnHeightChangedListener(mOnChildHeightChangedListener); updateHideSensitiveForChild(child); + child.setOnHeightChangedListener(mOnChildHeightChangedListener); generateAddAnimation(child, false /* fromMoreCard */); updateAnimationState(child); updateChronometerForChild(child); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java index e724e65e98a2d..344ad4a00c34c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java @@ -95,11 +95,16 @@ public class NotificationStackScrollLayoutController { mNotificationRoundnessManager.setOnRoundingChangedCallback(mView::invalidate); mView.addOnExpandedHeightChangedListener(mNotificationRoundnessManager::setExpanded); - mTunerService.addTunable((key, newValue) -> { - if (key.equals(Settings.Secure.NOTIFICATION_DISMISS_RTL)) { - mView.updateDismissRtlSetting("1".equals(newValue)); - } - }, HIGH_PRIORITY, Settings.Secure.NOTIFICATION_DISMISS_RTL); + mTunerService.addTunable( + (key, newValue) -> { + if (key.equals(Settings.Secure.NOTIFICATION_DISMISS_RTL)) { + mView.updateDismissRtlSetting("1".equals(newValue)); + } else if (key.equals(Settings.Secure.NOTIFICATION_HISTORY_ENABLED)) { + updateFooter(); + } + }, + Settings.Secure.NOTIFICATION_DISMISS_RTL, + Settings.Secure.NOTIFICATION_HISTORY_ENABLED); } public void addOnExpandedHeightChangedListener(BiConsumer listener) {