OSDN Git Service

Fixed groups with min priority children
authorSelim Cinek <cinek@google.com>
Wed, 17 Oct 2018 00:30:05 +0000 (17:30 -0700)
committerSelim Cinek <cinek@google.com>
Wed, 17 Oct 2018 00:30:05 +0000 (17:30 -0700)
Previously  min priority  notifications would be
empty on the lockscreen. We're now showing them
if they are part of a group.

Bug: 117349034
Test: add group with min priority children on lockscreen
Change-Id: I3070e95f63c3b2cf227fbefdb53e3a3d09927ae9

packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java

index f69ad43..5b3082b 100644 (file)
@@ -327,6 +327,17 @@ public class NotificationViewHierarchyManager {
                     entry.notification) && !entry.row.isRemoved();
             boolean showOnKeyguard = mLockscreenUserManager.shouldShowOnKeyguard(entry
                     .notification);
+            if (!showOnKeyguard) {
+                // min priority notifications should show if their summary is showing
+                if (mGroupManager.isChildInGroupWithSummary(entry.notification)) {
+                    ExpandableNotificationRow summary = mGroupManager.getLogicalGroupSummary(
+                            entry.notification);
+                    if (summary != null && mLockscreenUserManager.shouldShowOnKeyguard(
+                            summary.getStatusBarNotification()))         {
+                        showOnKeyguard = true;
+                    }
+                }
+            }
             if (suppressedSummary
                     || mLockscreenUserManager.shouldHideNotifications(userId)
                     || (isLocked && !showOnKeyguard)) {