Put NaN checks where it is otherwise not expected
We are getting NaN failures during touch events on the PanelView. I was able to narrow this down to two possible sources, but it is unclear which is actually causing the problem. No repro steps are available at this time, so this is the best short term fix. Fixes: 152817428 Test: manual Change-Id: I04ceb2128c54f88289f560f0e5636f3093f405d0
This commit is contained in:
@@ -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;
|
||||
@@ -2010,7 +2012,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
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user