Merge "Fix fickle footer visibility" into sc-dev
This commit is contained in:
@@ -664,7 +664,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
mDebugPaint.setColor(Color.CYAN);
|
mDebugPaint.setColor(Color.CYAN);
|
||||||
canvas.drawLine(0, y, getWidth(), y, mDebugPaint);
|
canvas.drawLine(0, y, getWidth(), y, mDebugPaint);
|
||||||
|
|
||||||
y = (int) (mAmbientState.getStackY() + mSidePaddings + mAmbientState.getStackHeight());
|
y = (int) (mAmbientState.getStackY() + mAmbientState.getStackHeight());
|
||||||
mDebugPaint.setColor(Color.BLUE);
|
mDebugPaint.setColor(Color.BLUE);
|
||||||
canvas.drawLine(0, y, getWidth(), y, mDebugPaint);
|
canvas.drawLine(0, y, getWidth(), y, mDebugPaint);
|
||||||
}
|
}
|
||||||
@@ -1151,7 +1151,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
if (mQsExpansionFraction <= 0) {
|
if (mQsExpansionFraction <= 0) {
|
||||||
final float scrimTopPadding = mAmbientState.isOnKeyguard() ? 0 : mSidePaddings;
|
final float scrimTopPadding = mAmbientState.isOnKeyguard() ? 0 : mSidePaddings;
|
||||||
final float stackEndHeight = Math.max(0f,
|
final float stackEndHeight = Math.max(0f,
|
||||||
getHeight() - getEmptyBottomMargin() - stackY - scrimTopPadding);
|
getHeight() - getEmptyBottomMargin() - stackY);
|
||||||
mAmbientState.setStackEndHeight(stackEndHeight);
|
mAmbientState.setStackEndHeight(stackEndHeight);
|
||||||
mAmbientState.setStackHeight(
|
mAmbientState.setStackHeight(
|
||||||
MathUtils.lerp(stackEndHeight * StackScrollAlgorithm.START_FRACTION,
|
MathUtils.lerp(stackEndHeight * StackScrollAlgorithm.START_FRACTION,
|
||||||
@@ -2068,18 +2068,22 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
|
|
||||||
@ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
|
@ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
|
||||||
private void updateContentHeight() {
|
private void updateContentHeight() {
|
||||||
int height = 0;
|
final float scrimTopPadding = mAmbientState.isOnKeyguard() ? 0 : mSidePaddings;
|
||||||
|
int height = (int) scrimTopPadding;
|
||||||
float previousPaddingRequest = mPaddingBetweenElements;
|
float previousPaddingRequest = mPaddingBetweenElements;
|
||||||
int numShownItems = 0;
|
int numShownItems = 0;
|
||||||
int numShownNotifs = 0;
|
int numShownNotifs = 0;
|
||||||
boolean finish = false;
|
boolean finish = false;
|
||||||
int maxDisplayedNotifications = mMaxDisplayedNotifications;
|
int maxDisplayedNotifications = mMaxDisplayedNotifications;
|
||||||
ExpandableView previousView = null;
|
ExpandableView previousView = null;
|
||||||
|
|
||||||
for (int i = 0; i < getChildCount(); i++) {
|
for (int i = 0; i < getChildCount(); i++) {
|
||||||
ExpandableView expandableView = (ExpandableView) getChildAt(i);
|
ExpandableView expandableView = (ExpandableView) getChildAt(i);
|
||||||
boolean footerViewOnLockScreen = expandableView == mFooterView && onKeyguard();
|
boolean footerViewOnLockScreen = expandableView == mFooterView && onKeyguard();
|
||||||
|
|
||||||
if (expandableView.getVisibility() != View.GONE
|
if (expandableView.getVisibility() != View.GONE
|
||||||
&& !expandableView.hasNoContentHeight() && !footerViewOnLockScreen) {
|
&& !expandableView.hasNoContentHeight() && !footerViewOnLockScreen) {
|
||||||
|
|
||||||
boolean limitReached = maxDisplayedNotifications != -1
|
boolean limitReached = maxDisplayedNotifications != -1
|
||||||
&& numShownNotifs >= maxDisplayedNotifications;
|
&& numShownNotifs >= maxDisplayedNotifications;
|
||||||
final float viewHeight;
|
final float viewHeight;
|
||||||
|
|||||||
Reference in New Issue
Block a user