diff options
author | Alexey Kuzmin <alexeykuzmin@google.com> | 2019-09-25 15:21:23 +0100 |
---|---|---|
committer | Alexey Kuzmin <alexeykuzmin@google.com> | 2020-01-06 16:16:27 +0000 |
commit | 7b2c88c0a776a9fca379e4a5a5250bf19dd996a6 (patch) | |
tree | 23773e36d244d0d97edc168afe29673a98bbdb45 /tests/permission | |
parent | d301ecf55f57ae5a6d007f997ae2853a2983a027 (diff) |
Add VibrationAttributes
Added a class for attributes of vibrations, to gradually replace usage
of AudioAttributes in haptics context. Refactored VibrationService and
related classes to use VibrationAttributes, converting AudioAttributes
to VibrationAttributes and back as necessary
Test: manual. Since it's a refacroring, everything should work as before
Bug: 136810264
Change-Id: I82c04bc6f6fb723ee390e3b86a4a371564ab28d4
Diffstat (limited to 'tests/permission')
-rw-r--r-- | tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java b/tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java index c50229ae30f4..d1d6a26790fd 100644 --- a/tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java +++ b/tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java @@ -16,12 +16,12 @@ package com.android.framework.permission.tests; -import android.media.AudioAttributes; import android.os.Binder; import android.os.IVibratorService; import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.VibrationAttributes; import android.os.VibrationEffect; import android.test.suitebuilder.annotation.SmallTest; @@ -52,8 +52,8 @@ public class VibratorServicePermissionTest extends TestCase { try { final VibrationEffect effect = VibrationEffect.createOneShot(100, VibrationEffect.DEFAULT_AMPLITUDE); - final AudioAttributes attrs = new AudioAttributes.Builder() - .setUsage(AudioAttributes.USAGE_ALARM) + final VibrationAttributes attrs = new VibrationAttributes.Builder() + .setUsage(VibrationAttributes.USAGE_ALARM) .build(); mVibratorService.vibrate(Process.myUid(), null, effect, attrs, "testVibrate", new Binder()); |