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

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

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

View File

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