Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +16 −6 Original line number Diff line number Diff line Loading @@ -1811,9 +1811,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @Override @ShadeViewRefactor(RefactorComponent.COORDINATOR) public WindowInsets onApplyWindowInsets(WindowInsets insets) { mBottomInset = insets.getSystemWindowInsetBottom() + insets.getInsets(WindowInsets.Type.ime()).bottom; mBottomInset = insets.getInsets(WindowInsets.Type.ime()).bottom; mWaterfallTopInset = 0; final DisplayCutout cutout = insets.getDisplayCutout(); if (cutout != null) { Loading Loading @@ -2262,7 +2260,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @ShadeViewRefactor(RefactorComponent.COORDINATOR) private int getImeInset() { return Math.max(0, mBottomInset - (getRootView().getHeight() - getHeight())); // The NotificationStackScrollLayout does not extend all the way to the bottom of the // display. Therefore, subtract that space from the mBottomInset, in order to only include // the portion of the bottom inset that actually overlaps the NotificationStackScrollLayout. return Math.max(0, mBottomInset - (getRootView().getHeight() - getHeight() - getLocationOnScreen()[1])); } /** Loading Loading @@ -2970,12 +2972,19 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable childInGroup = (ExpandableNotificationRow) requestedView; requestedView = requestedRow = childInGroup.getNotificationParent(); } int position = 0; final float scrimTopPadding = mAmbientState.isOnKeyguard() ? 0 : mMinimumPaddings; int position = (int) scrimTopPadding; int visibleIndex = -1; ExpandableView lastVisibleChild = null; for (int i = 0; i < getChildCount(); i++) { ExpandableView child = getChildAtIndex(i); boolean notGone = child.getVisibility() != View.GONE; if (notGone) visibleIndex++; if (notGone && !child.hasNoContentHeight()) { if (position != 0) { if (position != scrimTopPadding) { if (lastVisibleChild != null) { position += calculateGapHeight(lastVisibleChild, child, visibleIndex); } position += mPaddingBetweenElements; } } Loading @@ -2987,6 +2996,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } if (notGone) { position += getIntrinsicHeight(child); lastVisibleChild = child; } } return 0; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +16 −6 Original line number Diff line number Diff line Loading @@ -1811,9 +1811,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @Override @ShadeViewRefactor(RefactorComponent.COORDINATOR) public WindowInsets onApplyWindowInsets(WindowInsets insets) { mBottomInset = insets.getSystemWindowInsetBottom() + insets.getInsets(WindowInsets.Type.ime()).bottom; mBottomInset = insets.getInsets(WindowInsets.Type.ime()).bottom; mWaterfallTopInset = 0; final DisplayCutout cutout = insets.getDisplayCutout(); if (cutout != null) { Loading Loading @@ -2262,7 +2260,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @ShadeViewRefactor(RefactorComponent.COORDINATOR) private int getImeInset() { return Math.max(0, mBottomInset - (getRootView().getHeight() - getHeight())); // The NotificationStackScrollLayout does not extend all the way to the bottom of the // display. Therefore, subtract that space from the mBottomInset, in order to only include // the portion of the bottom inset that actually overlaps the NotificationStackScrollLayout. return Math.max(0, mBottomInset - (getRootView().getHeight() - getHeight() - getLocationOnScreen()[1])); } /** Loading Loading @@ -2970,12 +2972,19 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable childInGroup = (ExpandableNotificationRow) requestedView; requestedView = requestedRow = childInGroup.getNotificationParent(); } int position = 0; final float scrimTopPadding = mAmbientState.isOnKeyguard() ? 0 : mMinimumPaddings; int position = (int) scrimTopPadding; int visibleIndex = -1; ExpandableView lastVisibleChild = null; for (int i = 0; i < getChildCount(); i++) { ExpandableView child = getChildAtIndex(i); boolean notGone = child.getVisibility() != View.GONE; if (notGone) visibleIndex++; if (notGone && !child.hasNoContentHeight()) { if (position != 0) { if (position != scrimTopPadding) { if (lastVisibleChild != null) { position += calculateGapHeight(lastVisibleChild, child, visibleIndex); } position += mPaddingBetweenElements; } } Loading @@ -2987,6 +2996,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable } if (notGone) { position += getIntrinsicHeight(child); lastVisibleChild = child; } } return 0; Loading