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
This commit is contained in:
Evan Laird
2020-11-20 17:20:47 -05:00
parent f82f0bc28e
commit e40025cc0b

View File

@@ -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 = "