summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ioana Alexandru <aioana@google.com> 2024-04-17 09:50:39 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-04-17 09:50:39 +0000
commit141b787e6c0ae79f2141cd02e536ff7fbf992ebc (patch)
tree255c865dbf186b4816e2a349c8a39803fccd2095
parent0c6504624311a2da58957a5d08ed6f8bec8b0a7a (diff)
parent3481c823e192cdcdb410825c79c414aefe77a72f (diff)
Merge "Retain empty shade visibility on reinflation" into main
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java11
1 files changed, 6 insertions, 5 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 82559dec9f86..bb656513473a 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
@@ -4509,18 +4509,18 @@ public class NotificationStackScrollLayout
mEmptyShadeView.setVisible(visible, mIsExpanded && mAnimationsEnabled);
if (areNotificationsHiddenInShade) {
- updateEmptyShadeView(R.string.dnd_suppressing_shade_text, 0, 0);
+ updateEmptyShadeViewResources(R.string.dnd_suppressing_shade_text, 0, 0);
} else if (hasFilteredOutSeenNotifications) {
- updateEmptyShadeView(
+ updateEmptyShadeViewResources(
R.string.no_unseen_notif_text,
R.string.unlock_to_see_notif_text,
R.drawable.ic_friction_lock_closed);
} else {
- updateEmptyShadeView(R.string.empty_shade_text, 0, 0);
+ updateEmptyShadeViewResources(R.string.empty_shade_text, 0, 0);
}
}
- private void updateEmptyShadeView(
+ private void updateEmptyShadeViewResources(
@StringRes int newTextRes,
@StringRes int newFooterTextRes,
@DrawableRes int newFooterIconRes) {
@@ -5338,7 +5338,8 @@ public class NotificationStackScrollLayout
mActivityStarter.startActivity(intent, true, true, Intent.FLAG_ACTIVITY_SINGLE_TOP);
});
setEmptyShadeView(view);
- updateEmptyShadeView(
+ view.setVisible(oldView != null && oldView.isVisible(), /* animate = */ false);
+ updateEmptyShadeViewResources(
oldView == null ? R.string.empty_shade_text : oldView.getTextResource(),
oldView == null ? 0 : oldView.getFooterTextResource(),
oldView == null ? 0 : oldView.getFooterIconResource());