Merge "Fix bug where shade is infinitely squishy after wallpaper change" into sc-v2-dev
This commit is contained in:
@@ -279,11 +279,11 @@ public class NotificationStackScrollLayoutController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onThemeChanged() {
|
public void onThemeChanged() {
|
||||||
updateShowEmptyShadeView();
|
|
||||||
mView.updateCornerRadius();
|
mView.updateCornerRadius();
|
||||||
mView.updateBgColor();
|
mView.updateBgColor();
|
||||||
mView.updateDecorViews();
|
mView.updateDecorViews();
|
||||||
mView.reinflateViews();
|
mView.reinflateViews();
|
||||||
|
updateShowEmptyShadeView();
|
||||||
updateFooter();
|
updateFooter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -376,6 +376,11 @@ public class StackScrollAlgorithm {
|
|||||||
|
|
||||||
final float stackHeight = ambientState.getStackHeight() - shelfHeight - scrimPadding;
|
final float stackHeight = ambientState.getStackHeight() - shelfHeight - scrimPadding;
|
||||||
final float stackEndHeight = ambientState.getStackEndHeight() - shelfHeight - scrimPadding;
|
final float stackEndHeight = ambientState.getStackEndHeight() - shelfHeight - scrimPadding;
|
||||||
|
if (stackEndHeight == 0f) {
|
||||||
|
// This should not happen, since even when the shade is empty we show EmptyShadeView
|
||||||
|
// but check just in case, so we don't return infinity or NaN.
|
||||||
|
return 0f;
|
||||||
|
}
|
||||||
return stackHeight / stackEndHeight;
|
return stackHeight / stackEndHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user