Fix isInSection NPE from null representative entry

Fixes: 398068574
Test: local
Flag: EXEMPT bug fix
Change-Id: I43ab1ffedac8c242f95cad12eec143b84489d9ff
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RankingCoordinator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RankingCoordinator.java
index 69b069d..9226450 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RankingCoordinator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RankingCoordinator.java
@@ -117,6 +117,7 @@
         @Override
         public boolean isInSection(ListEntry entry) {
             return !mHighPriorityProvider.isHighPriority(entry)
+                    && entry.getRepresentativeEntry() != null
                     && !entry.getRepresentativeEntry().isAmbient();
         }