Merge "Fix null checks in isInVisibleLocation." into tm-qpr-dev am: 871264790e am: c12661fb0a am: a3753e8839

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21850332

Change-Id: Iaee049e93a6e6b3aa98ff467c4a356475668e1c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ioana Alexandru
2023-03-17 15:36:34 +00:00
committed by Automerger Merge Worker

View File

@@ -831,18 +831,16 @@ public class NotificationStackScrollLayoutController {
private boolean isInVisibleLocation(NotificationEntry entry) { private boolean isInVisibleLocation(NotificationEntry entry) {
ExpandableNotificationRow row = entry.getRow(); ExpandableNotificationRow row = entry.getRow();
ExpandableViewState childViewState = row.getViewState(); if (row == null) {
if (childViewState == null) {
return false; return false;
} }
ExpandableViewState childViewState = row.getViewState();
if ((childViewState.location & ExpandableViewState.VISIBLE_LOCATIONS) == 0) { if ((childViewState.location & ExpandableViewState.VISIBLE_LOCATIONS) == 0) {
return false; return false;
} }
if (row.getVisibility() != View.VISIBLE) {
return false; return row.getVisibility() == View.VISIBLE;
}
return true;
} }
public boolean isViewAffectedBySwipe(ExpandableView expandableView) { public boolean isViewAffectedBySwipe(ExpandableView expandableView) {