diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-15 16:49:36 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-15 16:49:36 +0000 |
commit | df1c9c98e12490d61dab288937bb84d2fa1cedb2 (patch) | |
tree | e4f7271fe22cfce368164b1cc08aca4cd98eab2f /packages/SystemUI/src | |
parent | 4f289a22d892460338ffe1c028361ba31c6e75d8 (diff) | |
parent | b42c521965fa2591481e79f8c2752f1fd4627143 (diff) |
Snap for 8226173 from b42c521965fa2591481e79f8c2752f1fd4627143 to sc-v2-platform-release
Change-Id: Ie368028f3d9e82df15f6ff9c774309fb62755ca4
Diffstat (limited to 'packages/SystemUI/src')
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java index f14cc93c2046..9f440606a365 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java @@ -279,11 +279,11 @@ public class NotificationStackScrollLayoutController { @Override public void onThemeChanged() { - updateShowEmptyShadeView(); mView.updateCornerRadius(); mView.updateBgColor(); mView.updateDecorViews(); mView.reinflateViews(); + updateShowEmptyShadeView(); updateFooter(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java index 2c70a5fd9ce7..c4567df914f0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java @@ -376,6 +376,11 @@ public class StackScrollAlgorithm { final float stackHeight = ambientState.getStackHeight() - 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; } |