From d8dc940fc013756cc46bdde7cb1537025dcdaaae Mon Sep 17 00:00:00 2001 From: Lais Andrade Date: Tue, 6 Apr 2021 14:20:23 +0000 Subject: Rename CombinedVibrationEffect to CombinedVibration The change makes the distinction between VibrationEffect and CombinedVibratio clearer. The later is a combination of the former with the extra information about the vibrator ids, allowing effects to be played in one or more vibrators in parallel or in sequence. The methods create/start synced where also renamed to parallel (together with respective builder classes), to indicate they perform one or more effects in parallel on multiple vibrators. This is also a better match to the sequential combinations. This change also deprecates the Context.VIBRATOR_SERVICE in favour of the new VIBRATOR_MANAGER_SERVICE. The default vibrator can be retrieved from the manager system service. Same deprecation applied to InputDevice.getVibrator method. Fix: 184123900 Test: CombinedVibrationTest Change-Id: I44d8b225098d35fbf7783254acaf6a78f9fb4505 --- .../permission/tests/VibratorManagerServicePermissionTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/permission/src') 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 fe6854316133..7cd2c23162fb 100644 --- a/tests/permission/src/com/android/framework/permission/tests/VibratorManagerServicePermissionTest.java +++ b/tests/permission/src/com/android/framework/permission/tests/VibratorManagerServicePermissionTest.java @@ -23,7 +23,7 @@ import static junit.framework.Assert.fail; import android.Manifest; import android.content.Context; import android.os.Binder; -import android.os.CombinedVibrationEffect; +import android.os.CombinedVibration; import android.os.IVibratorManagerService; import android.os.IVibratorStateListener; import android.os.Process; @@ -50,8 +50,8 @@ import org.junit.runners.JUnit4; public class VibratorManagerServicePermissionTest { private static final String PACKAGE_NAME = "com.android.framework.permission.tests"; - private static final CombinedVibrationEffect EFFECT = - CombinedVibrationEffect.createSynced( + private static final CombinedVibration EFFECT = + CombinedVibration.createParallel( VibrationEffect.createOneShot(100, VibrationEffect.DEFAULT_AMPLITUDE)); private static final VibrationAttributes ATTRS = new VibrationAttributes.Builder() .setUsage(VibrationAttributes.USAGE_ALARM) -- cgit v1.2.3-59-g8ed1b