diff options
author | 2021-03-30 18:32:29 +0000 | |
---|---|---|
committer | 2021-04-13 13:04:05 +0000 | |
commit | 6e075783ee90c4e539e98e0335c97772d0a49812 (patch) | |
tree | b656e9506dc468ed35ed1d59a4584d7261f0d492 /tests/permission/src | |
parent | f5195618f89aa76a75df7f33d99775dc8bcc5c7a (diff) |
Add Vibrator.cancel method with usage filters
Add a new hidden API to Vibrator and VibratorManager that allows
vibrations to be cancelled based on their usage attribute.
The new API is used by the NotificationManagerService on volume button
press to only cancel ongoing attentional haptics, triggered for alarm,
notification or ringtone.
Fix: 182440404
Test: VibratorManagerTest & BuzzBeepBlinkTest
Change-Id: I4bf55928cf3b7dd79f66d53d570001a5205ce2d0
Diffstat (limited to 'tests/permission/src')
-rw-r--r-- | tests/permission/src/com/android/framework/permission/tests/VibratorManagerServicePermissionTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/permission/src/com/android/framework/permission/tests/VibratorManagerServicePermissionTest.java b/tests/permission/src/com/android/framework/permission/tests/VibratorManagerServicePermissionTest.java index 7cd2c23162fb..e0f3f03e9cb7 100644 --- a/tests/permission/src/com/android/framework/permission/tests/VibratorManagerServicePermissionTest.java +++ b/tests/permission/src/com/android/framework/permission/tests/VibratorManagerServicePermissionTest.java @@ -140,7 +140,7 @@ public class VibratorManagerServicePermissionTest { @Test public void testCancelVibrateFails() throws RemoteException { expectSecurityException("VIBRATE"); - mVibratorService.cancelVibrate(new Binder()); + mVibratorService.cancelVibrate(/* usageFilter= */ -1, new Binder()); } private void expectSecurityException(String expectedPermission) { |