Merge "Put NaN checks where it is otherwise not expected" into rvc-dev am: 38400273c8 am: baaa84539f

Change-Id: I3620b14afbebce6956f2447cbf55cebef12f8ad5
This commit is contained in:
Dave Mankoff
2020-04-01 21:10:09 +00:00
committed by Automerger Merge Worker
2 changed files with 13 additions and 1 deletions

View File

@@ -19,6 +19,8 @@ package com.android.systemui.statusbar.phone;
import static com.android.systemui.statusbar.notification.ActivityLaunchAnimator.ExpandAnimationParameters;
import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_ALL;
import static java.lang.Float.isNaN;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
@@ -2009,7 +2011,12 @@ public class NotificationPanelViewController extends PanelViewController {
@Override
protected float getOverExpansionAmount() {
return mNotificationStackScroller.getCurrentOverScrollAmount(true /* top */);
float result = mNotificationStackScroller.getCurrentOverScrollAmount(true /* top */);
if (isNaN(result)) {
Log.wtf(TAG, "OverExpansionAmount is NaN!");
}
return result;
}
@Override

View File

@@ -16,6 +16,8 @@
package com.android.systemui.statusbar.phone;
import static java.lang.Float.isNaN;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
@@ -638,6 +640,9 @@ public abstract class PanelViewController {
}
public void setExpandedHeightInternal(float h) {
if (isNaN(h)) {
Log.wtf(TAG, "ExpandedHeight set to NaN");
}
if (mExpandLatencyTracking && h != 0f) {
DejankUtils.postAfterTraversal(
() -> mLatencyTracker.onActionEnd(LatencyTracker.ACTION_EXPAND_PANEL));