OSDN Git Service

Add a reason field to vibrator service
authorAlexey Kuzmin <alexeykuzmin@google.com>
Mon, 16 Jul 2018 21:37:46 +0000 (22:37 +0100)
committerAlexey Kuzmin <alexeykuzmin@google.com>
Fri, 27 Jul 2018 19:34:22 +0000 (20:34 +0100)
Test: Run vibration test, see reason written to log and trace
Bug: 109654229
Change-Id: I5dbe9a5ff666535f02b5606f18438255ec8a50e8

tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrollingTest.java
tests/robotests/src/com/android/settings/testutils/shadow/ShadowVibrator.java

index bee208f..da91a1d 100644 (file)
@@ -106,6 +106,7 @@ public class FingerprintEnrollEnrollingTest {
                 anyInt(),
                 nullable(String.class),
                 any(VibrationEffect.class),
+                nullable(String.class),
                 nullable(AudioAttributes.class));
     }
 
index 9046720..69e08d5 100644 (file)
@@ -50,7 +50,8 @@ public class ShadowVibrator {
     public final Vibrator delegate = mock(Vibrator.class);
 
     @Implementation
-    public void vibrate(int uid, String opPkg, VibrationEffect vibe, AudioAttributes attributes) {
-        delegate.vibrate(uid, opPkg, vibe, attributes);
+    public void vibrate(int uid, String opPkg, VibrationEffect vibe, String reason,
+            AudioAttributes attributes) {
+        delegate.vibrate(uid, opPkg, vibe, reason, attributes);
     }
 }