From c899ee547c2d4c6367196461a23373f1237602d8 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 24 Jan 2018 18:37:07 -0800 Subject: [PATCH] PrintSpooler: Fix EqualsNaN in test Fix NaN comparisons in WorkflowTest. Bug: 72451126 Test: m javac-check RUN_ERROR_PRONE=true Merged-In: I3eba48ac3f8dc343cd22cac0f9fbf4d4e6c76631 Change-Id: I19db273ee442c912c2c1052d53b5b2e0c5cd968b --- .../printspooler/outofprocess/tests/WorkflowTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/WorkflowTest.java b/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/WorkflowTest.java index 184e559627660..888fedbe5ab78 100644 --- a/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/WorkflowTest.java +++ b/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/WorkflowTest.java @@ -154,16 +154,16 @@ public class WorkflowTest extends BasePrintTest { @AfterClass public static void enableAnimations() throws Exception { - if (sWindowAnimationScaleBefore != Float.NaN) { + if (!Float.isNaN(sWindowAnimationScaleBefore)) { runShellCommand( "settings put global window_animation_scale " + sWindowAnimationScaleBefore); } - if (sTransitionAnimationScaleBefore != Float.NaN) { + if (!Float.isNaN(sTransitionAnimationScaleBefore)) { runShellCommand( "settings put global transition_animation_scale " + sTransitionAnimationScaleBefore); } - if (sAnimatiorDurationScaleBefore != Float.NaN) { + if (!Float.isNaN(sAnimatiorDurationScaleBefore)) { runShellCommand( "settings put global animator_duration_scale " + sAnimatiorDurationScaleBefore); }