From e40025cc0b3be257993b883b833afa8db6256c65 Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Fri, 20 Nov 2020 17:20:47 -0500 Subject: [PATCH] Add wtf log if notification panel height is NaN NotificationPanelViewController#getMaxPanelHeightNonBypass() is the one place where we aren't explicitly checking for NaN where it could be introduced into PanelViewController mExpandedFraction. Test: manual Bug: 160688163 Change-Id: I3e5047295085cd61c3ceebe456c6560b28f616f7 --- .../statusbar/phone/NotificationPanelViewController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index 47b16c8eaaa5c..0f2c82e7812ab 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -1998,8 +1998,8 @@ public class NotificationPanelViewController extends PanelViewController { maxHeight = calculatePanelHeightShade(); } maxHeight = Math.max(min, maxHeight); - if (maxHeight == 0) { - Log.wtf(TAG, "maxPanelHeight is 0. getOverExpansionAmount(): " + if (maxHeight == 0 || isNaN(maxHeight)) { + Log.wtf(TAG, "maxPanelHeight is invalid. getOverExpansionAmount(): " + getOverExpansionAmount() + ", calculatePanelHeightQsExpanded: " + calculatePanelHeightQsExpanded() + ", calculatePanelHeightShade: " + calculatePanelHeightShade() + ", mStatusBarMinHeight = "