Merge "Fix NPE in StackScrollAlgorithm.isCyclingIn/Out" into main
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
index 0fcfc4b..7bbaf85 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
@@ -400,6 +400,7 @@
*/
public boolean isCyclingOut(ExpandableNotificationRow row, AmbientState ambientState) {
if (!NotificationHeadsUpCycling.isEnabled()) return false;
+ if (row.getEntry() == null) return false;
String cyclingOutKey = ambientState.getAvalanchePreviousHunKey();
return row.getEntry().getKey().equals(cyclingOutKey);
}
@@ -409,6 +410,7 @@
*/
public boolean isCyclingIn(ExpandableNotificationRow row, AmbientState ambientState) {
if (!NotificationHeadsUpCycling.isEnabled()) return false;
+ if (row.getEntry() == null) return false;
String cyclingInKey = ambientState.getAvalancheShowingHunKey();
return row.getEntry().getKey().equals(cyclingInKey);
}