summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lyn Han <lynhan@google.com> 2024-05-21 21:38:27 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-05-21 21:38:27 +0000
commit0e05178db11b308a11eae2f49429e529ebac9d0d (patch)
tree7212e4988e6524c91cc2d383b54236eafb5004ea
parent0c1ecb583de0af5784c53b419ad7fb7ad5c9f388 (diff)
parent6e3eae76eaf6590bae5052f63011422bcda5e591 (diff)
Merge "Fix NPE in StackScrollAlgorithm.isCyclingIn/Out" into main
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java2
1 files changed, 2 insertions, 0 deletions
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 0fcfc4b4b2c8..7bbaf8534ae2 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 class StackScrollAlgorithm {
*/
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 class StackScrollAlgorithm {
*/
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);
}