Fix flaky test case: com.android.server.vibrator.VibratorManagerServiceTest#vibrate_withIntensitySettings_appliesSettingsToScaleVibrations

We're canceling all vibrations at the end of test, because there are cases where the vibrator clean-up step (TurnOffVibratorStep) is taking longer than the clean-up timeout in the teardown.

Fix: 292208387
Test: atest VibratorManagerServiceTest
Change-Id: Ic5f868ab6e99e6fc35d5232c7cb3234cd3271bd5
diff --git a/services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java b/services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java
index c6cd078..4e3a893 100644
--- a/services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java
+++ b/services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java
@@ -509,7 +509,7 @@
         verify(listeners[0]).onVibrating(eq(true));
         verify(listeners[1]).onVibrating(eq(true));
         verify(listeners[2], never()).onVibrating(eq(true));
-        cancelVibrate(service);
+        cancelVibrate(service); // Clean up long-ish effect.
     }
 
     @Test
@@ -1333,6 +1333,8 @@
         // Alarm vibration will be scaled with SCALE_NONE.
         assertEquals(1f,
                 ((PrimitiveSegment) fakeVibrator.getAllEffectSegments().get(2)).getScale(), 1e-5);
+
+        cancelVibrate(service); // Clean up long-ish effect.
     }
 
     @Test
@@ -1368,7 +1370,7 @@
 
         // Vibration is not stopped nearly after updating service.
         assertFalse(waitUntil(s -> !s.isVibrating(1), service, 50));
-        cancelVibrate(service);
+        cancelVibrate(service); // Clean up long effect.
     }
 
     @Test